mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-82e5138eb12fa796/out/
cubepilot.rs

1#![doc = "MAVLink cubepilot dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
21#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22#[cfg_attr(feature = "serde", serde(tag = "type"))]
23#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24#[repr(u32)]
25#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
26pub enum ActuatorConfiguration {
27    #[doc = "Do nothing."]
28    ACTUATOR_CONFIGURATION_NONE = 0,
29    #[doc = "Command the actuator to beep now."]
30    ACTUATOR_CONFIGURATION_BEEP = 1,
31    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
32    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
33    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
34    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
35    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
36    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
37    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
38    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
39}
40impl ActuatorConfiguration {
41    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
42}
43impl Default for ActuatorConfiguration {
44    fn default() -> Self {
45        Self::DEFAULT
46    }
47}
48#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
49#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
50#[cfg_attr(feature = "serde", serde(tag = "type"))]
51#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
52#[repr(u32)]
53#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
54pub enum ActuatorOutputFunction {
55    #[doc = "No function (disabled)."]
56    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
57    #[doc = "Motor 1"]
58    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
59    #[doc = "Motor 2"]
60    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
61    #[doc = "Motor 3"]
62    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
63    #[doc = "Motor 4"]
64    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
65    #[doc = "Motor 5"]
66    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
67    #[doc = "Motor 6"]
68    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
69    #[doc = "Motor 7"]
70    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
71    #[doc = "Motor 8"]
72    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
73    #[doc = "Motor 9"]
74    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
75    #[doc = "Motor 10"]
76    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
77    #[doc = "Motor 11"]
78    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
79    #[doc = "Motor 12"]
80    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
81    #[doc = "Motor 13"]
82    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
83    #[doc = "Motor 14"]
84    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
85    #[doc = "Motor 15"]
86    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
87    #[doc = "Motor 16"]
88    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
89    #[doc = "Servo 1"]
90    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
91    #[doc = "Servo 2"]
92    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
93    #[doc = "Servo 3"]
94    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
95    #[doc = "Servo 4"]
96    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
97    #[doc = "Servo 5"]
98    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
99    #[doc = "Servo 6"]
100    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
101    #[doc = "Servo 7"]
102    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
103    #[doc = "Servo 8"]
104    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
105    #[doc = "Servo 9"]
106    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
107    #[doc = "Servo 10"]
108    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
109    #[doc = "Servo 11"]
110    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
111    #[doc = "Servo 12"]
112    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
113    #[doc = "Servo 13"]
114    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
115    #[doc = "Servo 14"]
116    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
117    #[doc = "Servo 15"]
118    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
119    #[doc = "Servo 16"]
120    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
121}
122impl ActuatorOutputFunction {
123    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
124}
125impl Default for ActuatorOutputFunction {
126    fn default() -> Self {
127        Self::DEFAULT
128    }
129}
130#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
132#[cfg_attr(feature = "serde", serde(tag = "type"))]
133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
134#[repr(u32)]
135#[doc = "Enumeration of the ADSB altimeter types"]
136pub enum AdsbAltitudeType {
137    #[doc = "Altitude reported from a Baro source using QNH reference"]
138    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
139    #[doc = "Altitude reported from a GNSS source"]
140    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
141}
142impl AdsbAltitudeType {
143    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
144}
145impl Default for AdsbAltitudeType {
146    fn default() -> Self {
147        Self::DEFAULT
148    }
149}
150#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
151#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
152#[cfg_attr(feature = "serde", serde(tag = "type"))]
153#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
154#[repr(u32)]
155#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
156pub enum AdsbEmitterType {
157    ADSB_EMITTER_TYPE_NO_INFO = 0,
158    ADSB_EMITTER_TYPE_LIGHT = 1,
159    ADSB_EMITTER_TYPE_SMALL = 2,
160    ADSB_EMITTER_TYPE_LARGE = 3,
161    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
162    ADSB_EMITTER_TYPE_HEAVY = 5,
163    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
164    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
165    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
166    ADSB_EMITTER_TYPE_GLIDER = 9,
167    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
168    ADSB_EMITTER_TYPE_PARACHUTE = 11,
169    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
170    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
171    ADSB_EMITTER_TYPE_UAV = 14,
172    ADSB_EMITTER_TYPE_SPACE = 15,
173    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
174    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
175    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
176    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
177}
178impl AdsbEmitterType {
179    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
180}
181impl Default for AdsbEmitterType {
182    fn default() -> Self {
183        Self::DEFAULT
184    }
185}
186bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
187impl AdsbFlags {
188    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
189}
190impl Default for AdsbFlags {
191    fn default() -> Self {
192        Self::DEFAULT
193    }
194}
195bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
196impl AisFlags {
197    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
198}
199impl Default for AisFlags {
200    fn default() -> Self {
201        Self::DEFAULT
202    }
203}
204#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
205#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
206#[cfg_attr(feature = "serde", serde(tag = "type"))]
207#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
208#[repr(u32)]
209#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
210pub enum AisNavStatus {
211    #[doc = "Under way using engine."]
212    UNDER_WAY = 0,
213    AIS_NAV_ANCHORED = 1,
214    AIS_NAV_UN_COMMANDED = 2,
215    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
216    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
217    AIS_NAV_MOORED = 5,
218    AIS_NAV_AGROUND = 6,
219    AIS_NAV_FISHING = 7,
220    AIS_NAV_SAILING = 8,
221    AIS_NAV_RESERVED_HSC = 9,
222    AIS_NAV_RESERVED_WIG = 10,
223    AIS_NAV_RESERVED_1 = 11,
224    AIS_NAV_RESERVED_2 = 12,
225    AIS_NAV_RESERVED_3 = 13,
226    #[doc = "Search And Rescue Transponder."]
227    AIS_NAV_AIS_SART = 14,
228    #[doc = "Not available (default)."]
229    AIS_NAV_UNKNOWN = 15,
230}
231impl AisNavStatus {
232    pub const DEFAULT: Self = Self::UNDER_WAY;
233}
234impl Default for AisNavStatus {
235    fn default() -> Self {
236        Self::DEFAULT
237    }
238}
239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
241#[cfg_attr(feature = "serde", serde(tag = "type"))]
242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
243#[repr(u32)]
244#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
245pub enum AisType {
246    #[doc = "Not available (default)."]
247    AIS_TYPE_UNKNOWN = 0,
248    AIS_TYPE_RESERVED_1 = 1,
249    AIS_TYPE_RESERVED_2 = 2,
250    AIS_TYPE_RESERVED_3 = 3,
251    AIS_TYPE_RESERVED_4 = 4,
252    AIS_TYPE_RESERVED_5 = 5,
253    AIS_TYPE_RESERVED_6 = 6,
254    AIS_TYPE_RESERVED_7 = 7,
255    AIS_TYPE_RESERVED_8 = 8,
256    AIS_TYPE_RESERVED_9 = 9,
257    AIS_TYPE_RESERVED_10 = 10,
258    AIS_TYPE_RESERVED_11 = 11,
259    AIS_TYPE_RESERVED_12 = 12,
260    AIS_TYPE_RESERVED_13 = 13,
261    AIS_TYPE_RESERVED_14 = 14,
262    AIS_TYPE_RESERVED_15 = 15,
263    AIS_TYPE_RESERVED_16 = 16,
264    AIS_TYPE_RESERVED_17 = 17,
265    AIS_TYPE_RESERVED_18 = 18,
266    AIS_TYPE_RESERVED_19 = 19,
267    #[doc = "Wing In Ground effect."]
268    AIS_TYPE_WIG = 20,
269    AIS_TYPE_WIG_HAZARDOUS_A = 21,
270    AIS_TYPE_WIG_HAZARDOUS_B = 22,
271    AIS_TYPE_WIG_HAZARDOUS_C = 23,
272    AIS_TYPE_WIG_HAZARDOUS_D = 24,
273    AIS_TYPE_WIG_RESERVED_1 = 25,
274    AIS_TYPE_WIG_RESERVED_2 = 26,
275    AIS_TYPE_WIG_RESERVED_3 = 27,
276    AIS_TYPE_WIG_RESERVED_4 = 28,
277    AIS_TYPE_WIG_RESERVED_5 = 29,
278    AIS_TYPE_FISHING = 30,
279    AIS_TYPE_TOWING = 31,
280    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
281    AIS_TYPE_TOWING_LARGE = 32,
282    #[doc = "Dredging or other underwater ops."]
283    AIS_TYPE_DREDGING = 33,
284    AIS_TYPE_DIVING = 34,
285    AIS_TYPE_MILITARY = 35,
286    AIS_TYPE_SAILING = 36,
287    AIS_TYPE_PLEASURE = 37,
288    AIS_TYPE_RESERVED_20 = 38,
289    AIS_TYPE_RESERVED_21 = 39,
290    #[doc = "High Speed Craft."]
291    AIS_TYPE_HSC = 40,
292    AIS_TYPE_HSC_HAZARDOUS_A = 41,
293    AIS_TYPE_HSC_HAZARDOUS_B = 42,
294    AIS_TYPE_HSC_HAZARDOUS_C = 43,
295    AIS_TYPE_HSC_HAZARDOUS_D = 44,
296    AIS_TYPE_HSC_RESERVED_1 = 45,
297    AIS_TYPE_HSC_RESERVED_2 = 46,
298    AIS_TYPE_HSC_RESERVED_3 = 47,
299    AIS_TYPE_HSC_RESERVED_4 = 48,
300    AIS_TYPE_HSC_UNKNOWN = 49,
301    AIS_TYPE_PILOT = 50,
302    #[doc = "Search And Rescue vessel."]
303    AIS_TYPE_SAR = 51,
304    AIS_TYPE_TUG = 52,
305    AIS_TYPE_PORT_TENDER = 53,
306    #[doc = "Anti-pollution equipment."]
307    AIS_TYPE_ANTI_POLLUTION = 54,
308    AIS_TYPE_LAW_ENFORCEMENT = 55,
309    AIS_TYPE_SPARE_LOCAL_1 = 56,
310    AIS_TYPE_SPARE_LOCAL_2 = 57,
311    AIS_TYPE_MEDICAL_TRANSPORT = 58,
312    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
313    AIS_TYPE_NONECOMBATANT = 59,
314    AIS_TYPE_PASSENGER = 60,
315    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
316    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
317    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
318    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
319    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
320    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
321    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
322    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
323    AIS_TYPE_PASSENGER_UNKNOWN = 69,
324    AIS_TYPE_CARGO = 70,
325    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
326    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
327    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
328    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
329    AIS_TYPE_CARGO_RESERVED_1 = 75,
330    AIS_TYPE_CARGO_RESERVED_2 = 76,
331    AIS_TYPE_CARGO_RESERVED_3 = 77,
332    AIS_TYPE_CARGO_RESERVED_4 = 78,
333    AIS_TYPE_CARGO_UNKNOWN = 79,
334    AIS_TYPE_TANKER = 80,
335    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
336    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
337    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
338    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
339    AIS_TYPE_TANKER_RESERVED_1 = 85,
340    AIS_TYPE_TANKER_RESERVED_2 = 86,
341    AIS_TYPE_TANKER_RESERVED_3 = 87,
342    AIS_TYPE_TANKER_RESERVED_4 = 88,
343    AIS_TYPE_TANKER_UNKNOWN = 89,
344    AIS_TYPE_OTHER = 90,
345    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
346    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
347    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
348    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
349    AIS_TYPE_OTHER_RESERVED_1 = 95,
350    AIS_TYPE_OTHER_RESERVED_2 = 96,
351    AIS_TYPE_OTHER_RESERVED_3 = 97,
352    AIS_TYPE_OTHER_RESERVED_4 = 98,
353    AIS_TYPE_OTHER_UNKNOWN = 99,
354}
355impl AisType {
356    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
357}
358impl Default for AisType {
359    fn default() -> Self {
360        Self::DEFAULT
361    }
362}
363bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
364impl AttitudeTargetTypemask {
365    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
366}
367impl Default for AttitudeTargetTypemask {
368    fn default() -> Self {
369        Self::DEFAULT
370    }
371}
372#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
373#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
374#[cfg_attr(feature = "serde", serde(tag = "type"))]
375#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
376#[repr(u32)]
377#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
378pub enum AutotuneAxis {
379    #[doc = "Autotune roll axis."]
380    AUTOTUNE_AXIS_ROLL = 1,
381    #[doc = "Autotune pitch axis."]
382    AUTOTUNE_AXIS_PITCH = 2,
383    #[doc = "Autotune yaw axis."]
384    AUTOTUNE_AXIS_YAW = 4,
385}
386impl AutotuneAxis {
387    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
388}
389impl Default for AutotuneAxis {
390    fn default() -> Self {
391        Self::DEFAULT
392    }
393}
394bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
395impl CameraCapFlags {
396    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
397}
398impl Default for CameraCapFlags {
399    fn default() -> Self {
400        Self::DEFAULT
401    }
402}
403#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
405#[cfg_attr(feature = "serde", serde(tag = "type"))]
406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
407#[repr(u32)]
408#[doc = "Camera Modes."]
409pub enum CameraMode {
410    #[doc = "Camera is in image/photo capture mode."]
411    CAMERA_MODE_IMAGE = 0,
412    #[doc = "Camera is in video capture mode."]
413    CAMERA_MODE_VIDEO = 1,
414    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
415    CAMERA_MODE_IMAGE_SURVEY = 2,
416}
417impl CameraMode {
418    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
419}
420impl Default for CameraMode {
421    fn default() -> Self {
422        Self::DEFAULT
423    }
424}
425#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
426#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
427#[cfg_attr(feature = "serde", serde(tag = "type"))]
428#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
429#[repr(u32)]
430#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
431pub enum CameraSource {
432    #[doc = "Default camera source."]
433    CAMERA_SOURCE_DEFAULT = 0,
434    #[doc = "RGB camera source."]
435    CAMERA_SOURCE_RGB = 1,
436    #[doc = "IR camera source."]
437    CAMERA_SOURCE_IR = 2,
438    #[doc = "NDVI camera source."]
439    CAMERA_SOURCE_NDVI = 3,
440}
441impl CameraSource {
442    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
443}
444impl Default for CameraSource {
445    fn default() -> Self {
446        Self::DEFAULT
447    }
448}
449#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
451#[cfg_attr(feature = "serde", serde(tag = "type"))]
452#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
453#[repr(u32)]
454#[doc = "Camera tracking modes"]
455pub enum CameraTrackingMode {
456    #[doc = "Not tracking"]
457    CAMERA_TRACKING_MODE_NONE = 0,
458    #[doc = "Target is a point"]
459    CAMERA_TRACKING_MODE_POINT = 1,
460    #[doc = "Target is a rectangle"]
461    CAMERA_TRACKING_MODE_RECTANGLE = 2,
462}
463impl CameraTrackingMode {
464    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
465}
466impl Default for CameraTrackingMode {
467    fn default() -> Self {
468        Self::DEFAULT
469    }
470}
471#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
473#[cfg_attr(feature = "serde", serde(tag = "type"))]
474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
475#[repr(u32)]
476#[doc = "Camera tracking status flags"]
477pub enum CameraTrackingStatusFlags {
478    #[doc = "Camera is not tracking"]
479    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
480    #[doc = "Camera is tracking"]
481    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
482    #[doc = "Camera tracking in error state"]
483    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
484}
485impl CameraTrackingStatusFlags {
486    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
487}
488impl Default for CameraTrackingStatusFlags {
489    fn default() -> Self {
490        Self::DEFAULT
491    }
492}
493bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
494impl CameraTrackingTargetData {
495    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
496}
497impl Default for CameraTrackingTargetData {
498    fn default() -> Self {
499        Self::DEFAULT
500    }
501}
502#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
504#[cfg_attr(feature = "serde", serde(tag = "type"))]
505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
506#[repr(u32)]
507#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
508pub enum CameraZoomType {
509    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
510    ZOOM_TYPE_STEP = 0,
511    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
512    ZOOM_TYPE_CONTINUOUS = 1,
513    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
514    ZOOM_TYPE_RANGE = 2,
515    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
516    ZOOM_TYPE_FOCAL_LENGTH = 3,
517    #[doc = "Zoom value as horizontal field of view in degrees."]
518    ZOOM_TYPE_HORIZONTAL_FOV = 4,
519}
520impl CameraZoomType {
521    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
522}
523impl Default for CameraZoomType {
524    fn default() -> Self {
525        Self::DEFAULT
526    }
527}
528#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
529#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
530#[cfg_attr(feature = "serde", serde(tag = "type"))]
531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
532#[repr(u32)]
533pub enum CanFilterOp {
534    CAN_FILTER_REPLACE = 0,
535    CAN_FILTER_ADD = 1,
536    CAN_FILTER_REMOVE = 2,
537}
538impl CanFilterOp {
539    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
540}
541impl Default for CanFilterOp {
542    fn default() -> Self {
543        Self::DEFAULT
544    }
545}
546#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
548#[cfg_attr(feature = "serde", serde(tag = "type"))]
549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
550#[repr(u32)]
551#[doc = "Possible responses from a CELLULAR_CONFIG message."]
552pub enum CellularConfigResponse {
553    #[doc = "Changes accepted."]
554    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
555    #[doc = "Invalid APN."]
556    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
557    #[doc = "Invalid PIN."]
558    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
559    #[doc = "Changes rejected."]
560    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
561    #[doc = "PUK is required to unblock SIM card."]
562    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
563}
564impl CellularConfigResponse {
565    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
566}
567impl Default for CellularConfigResponse {
568    fn default() -> Self {
569        Self::DEFAULT
570    }
571}
572#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
573#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
574#[cfg_attr(feature = "serde", serde(tag = "type"))]
575#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
576#[repr(u32)]
577#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
578pub enum CellularNetworkFailedReason {
579    #[doc = "No error"]
580    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
581    #[doc = "Error state is unknown"]
582    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
583    #[doc = "SIM is required for the modem but missing"]
584    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
585    #[doc = "SIM is available, but not usable for connection"]
586    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
587}
588impl CellularNetworkFailedReason {
589    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
590}
591impl Default for CellularNetworkFailedReason {
592    fn default() -> Self {
593        Self::DEFAULT
594    }
595}
596#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
598#[cfg_attr(feature = "serde", serde(tag = "type"))]
599#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
600#[repr(u32)]
601#[doc = "Cellular network radio type"]
602pub enum CellularNetworkRadioType {
603    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
604    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
605    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
606    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
607    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
608}
609impl CellularNetworkRadioType {
610    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
611}
612impl Default for CellularNetworkRadioType {
613    fn default() -> Self {
614        Self::DEFAULT
615    }
616}
617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
619#[cfg_attr(feature = "serde", serde(tag = "type"))]
620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
621#[repr(u32)]
622#[doc = "These flags encode the cellular network status"]
623pub enum CellularStatusFlag {
624    #[doc = "State unknown or not reportable."]
625    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
626    #[doc = "Modem is unusable"]
627    CELLULAR_STATUS_FLAG_FAILED = 1,
628    #[doc = "Modem is being initialized"]
629    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
630    #[doc = "Modem is locked"]
631    CELLULAR_STATUS_FLAG_LOCKED = 3,
632    #[doc = "Modem is not enabled and is powered down"]
633    CELLULAR_STATUS_FLAG_DISABLED = 4,
634    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
635    CELLULAR_STATUS_FLAG_DISABLING = 5,
636    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
637    CELLULAR_STATUS_FLAG_ENABLING = 6,
638    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
639    CELLULAR_STATUS_FLAG_ENABLED = 7,
640    #[doc = "Modem is searching for a network provider to register"]
641    CELLULAR_STATUS_FLAG_SEARCHING = 8,
642    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
643    CELLULAR_STATUS_FLAG_REGISTERED = 9,
644    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
645    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
646    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
647    CELLULAR_STATUS_FLAG_CONNECTING = 11,
648    #[doc = "One or more packet data bearers is active and connected"]
649    CELLULAR_STATUS_FLAG_CONNECTED = 12,
650}
651impl CellularStatusFlag {
652    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
653}
654impl Default for CellularStatusFlag {
655    fn default() -> Self {
656        Self::DEFAULT
657    }
658}
659#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
660#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
661#[cfg_attr(feature = "serde", serde(tag = "type"))]
662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
663#[repr(u32)]
664#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
665pub enum CompMetadataType {
666    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
667    COMP_METADATA_TYPE_GENERAL = 0,
668    #[doc = "Parameter meta data."]
669    COMP_METADATA_TYPE_PARAMETER = 1,
670    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
671    COMP_METADATA_TYPE_COMMANDS = 2,
672    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
673    COMP_METADATA_TYPE_PERIPHERALS = 3,
674    #[doc = "Meta data for the events interface."]
675    COMP_METADATA_TYPE_EVENTS = 4,
676    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
677    COMP_METADATA_TYPE_ACTUATORS = 5,
678}
679impl CompMetadataType {
680    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
681}
682impl Default for CompMetadataType {
683    fn default() -> Self {
684        Self::DEFAULT
685    }
686}
687#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
689#[cfg_attr(feature = "serde", serde(tag = "type"))]
690#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
691#[repr(u32)]
692#[doc = "Indicates the ESC connection type."]
693pub enum EscConnectionType {
694    #[doc = "Traditional PPM ESC."]
695    ESC_CONNECTION_TYPE_PPM = 0,
696    #[doc = "Serial Bus connected ESC."]
697    ESC_CONNECTION_TYPE_SERIAL = 1,
698    #[doc = "One Shot PPM ESC."]
699    ESC_CONNECTION_TYPE_ONESHOT = 2,
700    #[doc = "I2C ESC."]
701    ESC_CONNECTION_TYPE_I2C = 3,
702    #[doc = "CAN-Bus ESC."]
703    ESC_CONNECTION_TYPE_CAN = 4,
704    #[doc = "DShot ESC."]
705    ESC_CONNECTION_TYPE_DSHOT = 5,
706}
707impl EscConnectionType {
708    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
709}
710impl Default for EscConnectionType {
711    fn default() -> Self {
712        Self::DEFAULT
713    }
714}
715bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
716impl EscFailureFlags {
717    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
718}
719impl Default for EscFailureFlags {
720    fn default() -> Self {
721        Self::DEFAULT
722    }
723}
724bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
725impl EstimatorStatusFlags {
726    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
727}
728impl Default for EstimatorStatusFlags {
729    fn default() -> Self {
730        Self::DEFAULT
731    }
732}
733#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
735#[cfg_attr(feature = "serde", serde(tag = "type"))]
736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
737#[repr(u32)]
738#[doc = "List of possible failure type to inject."]
739pub enum FailureType {
740    #[doc = "No failure injected, used to reset a previous failure."]
741    FAILURE_TYPE_OK = 0,
742    #[doc = "Sets unit off, so completely non-responsive."]
743    FAILURE_TYPE_OFF = 1,
744    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
745    FAILURE_TYPE_STUCK = 2,
746    #[doc = "Unit is reporting complete garbage."]
747    FAILURE_TYPE_GARBAGE = 3,
748    #[doc = "Unit is consistently wrong."]
749    FAILURE_TYPE_WRONG = 4,
750    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
751    FAILURE_TYPE_SLOW = 5,
752    #[doc = "Data of unit is delayed in time."]
753    FAILURE_TYPE_DELAYED = 6,
754    #[doc = "Unit is sometimes working, sometimes not."]
755    FAILURE_TYPE_INTERMITTENT = 7,
756}
757impl FailureType {
758    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
759}
760impl Default for FailureType {
761    fn default() -> Self {
762        Self::DEFAULT
763    }
764}
765#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
766#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
767#[cfg_attr(feature = "serde", serde(tag = "type"))]
768#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
769#[repr(u32)]
770#[doc = "List of possible units where failures can be injected."]
771pub enum FailureUnit {
772    FAILURE_UNIT_SENSOR_GYRO = 0,
773    FAILURE_UNIT_SENSOR_ACCEL = 1,
774    FAILURE_UNIT_SENSOR_MAG = 2,
775    FAILURE_UNIT_SENSOR_BARO = 3,
776    FAILURE_UNIT_SENSOR_GPS = 4,
777    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
778    FAILURE_UNIT_SENSOR_VIO = 6,
779    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
780    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
781    FAILURE_UNIT_SYSTEM_BATTERY = 100,
782    FAILURE_UNIT_SYSTEM_MOTOR = 101,
783    FAILURE_UNIT_SYSTEM_SERVO = 102,
784    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
785    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
786    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
787}
788impl FailureUnit {
789    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
790}
791impl Default for FailureUnit {
792    fn default() -> Self {
793        Self::DEFAULT
794    }
795}
796#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
797#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
798#[cfg_attr(feature = "serde", serde(tag = "type"))]
799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
800#[repr(u32)]
801pub enum FenceBreach {
802    #[doc = "No last fence breach"]
803    FENCE_BREACH_NONE = 0,
804    #[doc = "Breached minimum altitude"]
805    FENCE_BREACH_MINALT = 1,
806    #[doc = "Breached maximum altitude"]
807    FENCE_BREACH_MAXALT = 2,
808    #[doc = "Breached fence boundary"]
809    FENCE_BREACH_BOUNDARY = 3,
810}
811impl FenceBreach {
812    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
813}
814impl Default for FenceBreach {
815    fn default() -> Self {
816        Self::DEFAULT
817    }
818}
819#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
821#[cfg_attr(feature = "serde", serde(tag = "type"))]
822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
823#[repr(u32)]
824#[doc = "Actions being taken to mitigate/prevent fence breach"]
825pub enum FenceMitigate {
826    #[doc = "Unknown"]
827    FENCE_MITIGATE_UNKNOWN = 0,
828    #[doc = "No actions being taken"]
829    FENCE_MITIGATE_NONE = 1,
830    #[doc = "Velocity limiting active to prevent breach"]
831    FENCE_MITIGATE_VEL_LIMIT = 2,
832}
833impl FenceMitigate {
834    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
835}
836impl Default for FenceMitigate {
837    fn default() -> Self {
838        Self::DEFAULT
839    }
840}
841#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
842#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
843#[cfg_attr(feature = "serde", serde(tag = "type"))]
844#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
845#[repr(u32)]
846#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
847pub enum FenceType {
848    #[doc = "Maximum altitude fence"]
849    FENCE_TYPE_ALT_MAX = 1,
850    #[doc = "Circle fence"]
851    FENCE_TYPE_CIRCLE = 2,
852    #[doc = "Polygon fence"]
853    FENCE_TYPE_POLYGON = 4,
854    #[doc = "Minimum altitude fence"]
855    FENCE_TYPE_ALT_MIN = 8,
856}
857impl FenceType {
858    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
859}
860impl Default for FenceType {
861    fn default() -> Self {
862        Self::DEFAULT
863    }
864}
865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
867#[cfg_attr(feature = "serde", serde(tag = "type"))]
868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
869#[repr(u32)]
870#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
871pub enum FirmwareVersionType {
872    #[doc = "development release"]
873    FIRMWARE_VERSION_TYPE_DEV = 0,
874    #[doc = "alpha release"]
875    FIRMWARE_VERSION_TYPE_ALPHA = 64,
876    #[doc = "beta release"]
877    FIRMWARE_VERSION_TYPE_BETA = 128,
878    #[doc = "release candidate"]
879    FIRMWARE_VERSION_TYPE_RC = 192,
880    #[doc = "official stable release"]
881    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
882}
883impl FirmwareVersionType {
884    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
885}
886impl Default for FirmwareVersionType {
887    fn default() -> Self {
888        Self::DEFAULT
889    }
890}
891bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
892impl GimbalDeviceCapFlags {
893    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
894}
895impl Default for GimbalDeviceCapFlags {
896    fn default() -> Self {
897        Self::DEFAULT
898    }
899}
900bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
901impl GimbalDeviceErrorFlags {
902    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
903}
904impl Default for GimbalDeviceErrorFlags {
905    fn default() -> Self {
906        Self::DEFAULT
907    }
908}
909bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
910impl GimbalDeviceFlags {
911    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
912}
913impl Default for GimbalDeviceFlags {
914    fn default() -> Self {
915        Self::DEFAULT
916    }
917}
918bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
919impl GimbalManagerCapFlags {
920    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
921}
922impl Default for GimbalManagerCapFlags {
923    fn default() -> Self {
924        Self::DEFAULT
925    }
926}
927bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
928impl GimbalManagerFlags {
929    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
930}
931impl Default for GimbalManagerFlags {
932    fn default() -> Self {
933        Self::DEFAULT
934    }
935}
936#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
938#[cfg_attr(feature = "serde", serde(tag = "type"))]
939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
940#[repr(u32)]
941#[doc = "Type of GPS fix"]
942pub enum GpsFixType {
943    #[doc = "No GPS connected"]
944    GPS_FIX_TYPE_NO_GPS = 0,
945    #[doc = "No position information, GPS is connected"]
946    GPS_FIX_TYPE_NO_FIX = 1,
947    #[doc = "2D position"]
948    GPS_FIX_TYPE_2D_FIX = 2,
949    #[doc = "3D position"]
950    GPS_FIX_TYPE_3D_FIX = 3,
951    #[doc = "DGPS/SBAS aided 3D position"]
952    GPS_FIX_TYPE_DGPS = 4,
953    #[doc = "RTK float, 3D position"]
954    GPS_FIX_TYPE_RTK_FLOAT = 5,
955    #[doc = "RTK Fixed, 3D position"]
956    GPS_FIX_TYPE_RTK_FIXED = 6,
957    #[doc = "Static fixed, typically used for base stations"]
958    GPS_FIX_TYPE_STATIC = 7,
959    #[doc = "PPP, 3D position."]
960    GPS_FIX_TYPE_PPP = 8,
961}
962impl GpsFixType {
963    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
964}
965impl Default for GpsFixType {
966    fn default() -> Self {
967        Self::DEFAULT
968    }
969}
970bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
971impl GpsInputIgnoreFlags {
972    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
973}
974impl Default for GpsInputIgnoreFlags {
975    fn default() -> Self {
976        Self::DEFAULT
977    }
978}
979#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
980#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
981#[cfg_attr(feature = "serde", serde(tag = "type"))]
982#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
983#[repr(u32)]
984#[doc = "Gripper actions."]
985pub enum GripperActions {
986    #[doc = "Gripper release cargo."]
987    GRIPPER_ACTION_RELEASE = 0,
988    #[doc = "Gripper grab onto cargo."]
989    GRIPPER_ACTION_GRAB = 1,
990}
991impl GripperActions {
992    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
993}
994impl Default for GripperActions {
995    fn default() -> Self {
996        Self::DEFAULT
997    }
998}
999bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1000impl HighresImuUpdatedFlags {
1001    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1002}
1003impl Default for HighresImuUpdatedFlags {
1004    fn default() -> Self {
1005        Self::DEFAULT
1006    }
1007}
1008bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1009impl HilActuatorControlsFlags {
1010    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1011}
1012impl Default for HilActuatorControlsFlags {
1013    fn default() -> Self {
1014        Self::DEFAULT
1015    }
1016}
1017bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1018impl HilSensorUpdatedFlags {
1019    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1020}
1021impl Default for HilSensorUpdatedFlags {
1022    fn default() -> Self {
1023        Self::DEFAULT
1024    }
1025}
1026bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1027impl HlFailureFlag {
1028    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1029}
1030impl Default for HlFailureFlag {
1031    fn default() -> Self {
1032        Self::DEFAULT
1033    }
1034}
1035bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1036impl IlluminatorErrorFlags {
1037    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1038}
1039impl Default for IlluminatorErrorFlags {
1040    fn default() -> Self {
1041        Self::DEFAULT
1042    }
1043}
1044#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1046#[cfg_attr(feature = "serde", serde(tag = "type"))]
1047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1048#[repr(u32)]
1049#[doc = "Modes of illuminator"]
1050pub enum IlluminatorMode {
1051    #[doc = "Illuminator mode is not specified/unknown"]
1052    ILLUMINATOR_MODE_UNKNOWN = 0,
1053    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1054    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1055    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1056    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1057}
1058impl IlluminatorMode {
1059    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1060}
1061impl Default for IlluminatorMode {
1062    fn default() -> Self {
1063        Self::DEFAULT
1064    }
1065}
1066#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1068#[cfg_attr(feature = "serde", serde(tag = "type"))]
1069#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1070#[repr(u32)]
1071#[doc = "Type of landing target"]
1072pub enum LandingTargetType {
1073    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1074    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1075    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1076    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1077    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1078    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1079    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1080    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1081}
1082impl LandingTargetType {
1083    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1084}
1085impl Default for LandingTargetType {
1086    fn default() -> Self {
1087        Self::DEFAULT
1088    }
1089}
1090#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1091#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1092#[cfg_attr(feature = "serde", serde(tag = "type"))]
1093#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1094#[repr(u32)]
1095pub enum MagCalStatus {
1096    MAG_CAL_NOT_STARTED = 0,
1097    MAG_CAL_WAITING_TO_START = 1,
1098    MAG_CAL_RUNNING_STEP_ONE = 2,
1099    MAG_CAL_RUNNING_STEP_TWO = 3,
1100    MAG_CAL_SUCCESS = 4,
1101    MAG_CAL_FAILED = 5,
1102    MAG_CAL_BAD_ORIENTATION = 6,
1103    MAG_CAL_BAD_RADIUS = 7,
1104}
1105impl MagCalStatus {
1106    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1107}
1108impl Default for MagCalStatus {
1109    fn default() -> Self {
1110        Self::DEFAULT
1111    }
1112}
1113#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1114#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1115#[cfg_attr(feature = "serde", serde(tag = "type"))]
1116#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1117#[repr(u32)]
1118pub enum MavArmAuthDeniedReason {
1119    #[doc = "Not a specific reason"]
1120    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1121    #[doc = "Authorizer will send the error as string to GCS"]
1122    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1123    #[doc = "At least one waypoint have a invalid value"]
1124    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1125    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1126    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1127    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1128    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1129    #[doc = "Weather is not good to fly"]
1130    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1131}
1132impl MavArmAuthDeniedReason {
1133    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1134}
1135impl Default for MavArmAuthDeniedReason {
1136    fn default() -> Self {
1137        Self::DEFAULT
1138    }
1139}
1140#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1141#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1142#[cfg_attr(feature = "serde", serde(tag = "type"))]
1143#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1144#[repr(u32)]
1145#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1146pub enum MavAutopilot {
1147    #[doc = "Generic autopilot, full support for everything"]
1148    MAV_AUTOPILOT_GENERIC = 0,
1149    #[doc = "Reserved for future use."]
1150    MAV_AUTOPILOT_RESERVED = 1,
1151    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1152    MAV_AUTOPILOT_SLUGS = 2,
1153    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1154    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1155    #[doc = "OpenPilot, <http://openpilot.org>"]
1156    MAV_AUTOPILOT_OPENPILOT = 4,
1157    #[doc = "Generic autopilot only supporting simple waypoints"]
1158    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1159    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1160    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1161    #[doc = "Generic autopilot supporting the full mission command set"]
1162    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1163    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1164    MAV_AUTOPILOT_INVALID = 8,
1165    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1166    MAV_AUTOPILOT_PPZ = 9,
1167    #[doc = "UAV Dev Board"]
1168    MAV_AUTOPILOT_UDB = 10,
1169    #[doc = "FlexiPilot"]
1170    MAV_AUTOPILOT_FP = 11,
1171    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1172    MAV_AUTOPILOT_PX4 = 12,
1173    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1174    MAV_AUTOPILOT_SMACCMPILOT = 13,
1175    #[doc = "AutoQuad -- <http://autoquad.org>"]
1176    MAV_AUTOPILOT_AUTOQUAD = 14,
1177    #[doc = "Armazila -- <http://armazila.com>"]
1178    MAV_AUTOPILOT_ARMAZILA = 15,
1179    #[doc = "Aerob -- <http://aerob.ru>"]
1180    MAV_AUTOPILOT_AEROB = 16,
1181    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1182    MAV_AUTOPILOT_ASLUAV = 17,
1183    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1184    MAV_AUTOPILOT_SMARTAP = 18,
1185    #[doc = "AirRails - <http://uaventure.com>"]
1186    MAV_AUTOPILOT_AIRRAILS = 19,
1187    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1188    MAV_AUTOPILOT_REFLEX = 20,
1189}
1190impl MavAutopilot {
1191    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1192}
1193impl Default for MavAutopilot {
1194    fn default() -> Self {
1195        Self::DEFAULT
1196    }
1197}
1198#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1200#[cfg_attr(feature = "serde", serde(tag = "type"))]
1201#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1202#[repr(u32)]
1203#[doc = "Enumeration for battery charge states."]
1204pub enum MavBatteryChargeState {
1205    #[doc = "Low battery state is not provided"]
1206    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1207    #[doc = "Battery is not in low state. Normal operation."]
1208    MAV_BATTERY_CHARGE_STATE_OK = 1,
1209    #[doc = "Battery state is low, warn and monitor close."]
1210    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1211    #[doc = "Battery state is critical, return or abort immediately."]
1212    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1213    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1214    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1215    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1216    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1217    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1218    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1219    #[doc = "Battery is charging."]
1220    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1221}
1222impl MavBatteryChargeState {
1223    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1224}
1225impl Default for MavBatteryChargeState {
1226    fn default() -> Self {
1227        Self::DEFAULT
1228    }
1229}
1230bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1231impl MavBatteryFault {
1232    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1233}
1234impl Default for MavBatteryFault {
1235    fn default() -> Self {
1236        Self::DEFAULT
1237    }
1238}
1239#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1240#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1241#[cfg_attr(feature = "serde", serde(tag = "type"))]
1242#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1243#[repr(u32)]
1244#[doc = "Enumeration of battery functions"]
1245pub enum MavBatteryFunction {
1246    #[doc = "Battery function is unknown"]
1247    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1248    #[doc = "Battery supports all flight systems"]
1249    MAV_BATTERY_FUNCTION_ALL = 1,
1250    #[doc = "Battery for the propulsion system"]
1251    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1252    #[doc = "Avionics battery"]
1253    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1254    #[doc = "Payload battery"]
1255    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1256}
1257impl MavBatteryFunction {
1258    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1259}
1260impl Default for MavBatteryFunction {
1261    fn default() -> Self {
1262        Self::DEFAULT
1263    }
1264}
1265#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1267#[cfg_attr(feature = "serde", serde(tag = "type"))]
1268#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1269#[repr(u32)]
1270#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1271pub enum MavBatteryMode {
1272    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1273    MAV_BATTERY_MODE_UNKNOWN = 0,
1274    #[doc = "Battery is auto discharging (towards storage level)."]
1275    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1276    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1277    MAV_BATTERY_MODE_HOT_SWAP = 2,
1278}
1279impl MavBatteryMode {
1280    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1281}
1282impl Default for MavBatteryMode {
1283    fn default() -> Self {
1284        Self::DEFAULT
1285    }
1286}
1287#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1288#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1289#[cfg_attr(feature = "serde", serde(tag = "type"))]
1290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1291#[repr(u32)]
1292#[doc = "Enumeration of battery types"]
1293pub enum MavBatteryType {
1294    #[doc = "Not specified."]
1295    MAV_BATTERY_TYPE_UNKNOWN = 0,
1296    #[doc = "Lithium polymer battery"]
1297    MAV_BATTERY_TYPE_LIPO = 1,
1298    #[doc = "Lithium-iron-phosphate battery"]
1299    MAV_BATTERY_TYPE_LIFE = 2,
1300    #[doc = "Lithium-ION battery"]
1301    MAV_BATTERY_TYPE_LION = 3,
1302    #[doc = "Nickel metal hydride battery"]
1303    MAV_BATTERY_TYPE_NIMH = 4,
1304}
1305impl MavBatteryType {
1306    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1307}
1308impl Default for MavBatteryType {
1309    fn default() -> Self {
1310        Self::DEFAULT
1311    }
1312}
1313#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1315#[cfg_attr(feature = "serde", serde(tag = "type"))]
1316#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1317#[repr(u32)]
1318#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1319pub enum MavCmd {
1320    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1321    MAV_CMD_NAV_WAYPOINT = 16,
1322    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1323    MAV_CMD_NAV_LOITER_UNLIM = 17,
1324    #[doc = "Loiter around this waypoint for X turns"]
1325    MAV_CMD_NAV_LOITER_TURNS = 18,
1326    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1327    MAV_CMD_NAV_LOITER_TIME = 19,
1328    #[doc = "Return to launch location"]
1329    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1330    #[doc = "Land at location."]
1331    MAV_CMD_NAV_LAND = 21,
1332    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1333    MAV_CMD_NAV_TAKEOFF = 22,
1334    #[doc = "Land at local position (local frame only)"]
1335    MAV_CMD_NAV_LAND_LOCAL = 23,
1336    #[doc = "Takeoff from local position (local frame only)"]
1337    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1338    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1339    MAV_CMD_NAV_FOLLOW = 25,
1340    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1341    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1342    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1343    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1344    #[doc = "Begin following a target"]
1345    MAV_CMD_DO_FOLLOW = 32,
1346    #[doc = "Reposition the MAV after a follow target command has been sent"]
1347    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1348    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1349    MAV_CMD_DO_ORBIT = 34,
1350    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1351    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1352    MAV_CMD_NAV_ROI = 80,
1353    #[doc = "Control autonomous path planning on the MAV."]
1354    MAV_CMD_NAV_PATHPLANNING = 81,
1355    #[doc = "Navigate to waypoint using a spline path."]
1356    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1357    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1358    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1359    #[doc = "Land using VTOL mode"]
1360    MAV_CMD_NAV_VTOL_LAND = 85,
1361    #[doc = "hand control over to an external controller"]
1362    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1363    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1364    MAV_CMD_NAV_DELAY = 93,
1365    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1366    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1367    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1368    MAV_CMD_NAV_LAST = 95,
1369    #[doc = "Delay mission state machine."]
1370    MAV_CMD_CONDITION_DELAY = 112,
1371    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1372    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1373    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1374    MAV_CMD_CONDITION_DISTANCE = 114,
1375    #[doc = "Reach a certain target angle."]
1376    MAV_CMD_CONDITION_YAW = 115,
1377    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1378    MAV_CMD_CONDITION_LAST = 159,
1379    #[doc = "Set system mode."]
1380    MAV_CMD_DO_SET_MODE = 176,
1381    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1382    MAV_CMD_DO_JUMP = 177,
1383    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1384    MAV_CMD_DO_CHANGE_SPEED = 178,
1385    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1386    MAV_CMD_DO_SET_HOME = 179,
1387    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1388    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1389    MAV_CMD_DO_SET_PARAMETER = 180,
1390    #[doc = "Set a relay to a condition."]
1391    MAV_CMD_DO_SET_RELAY = 181,
1392    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1393    MAV_CMD_DO_REPEAT_RELAY = 182,
1394    #[doc = "Set a servo to a desired PWM value."]
1395    MAV_CMD_DO_SET_SERVO = 183,
1396    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1397    MAV_CMD_DO_REPEAT_SERVO = 184,
1398    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1399    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1400    #[doc = "Change altitude set point."]
1401    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1402    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1403    MAV_CMD_DO_SET_ACTUATOR = 187,
1404    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1405    MAV_CMD_DO_RETURN_PATH_START = 188,
1406    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1407    MAV_CMD_DO_LAND_START = 189,
1408    #[doc = "Mission command to perform a landing from a rally point."]
1409    MAV_CMD_DO_RALLY_LAND = 190,
1410    #[doc = "Mission command to safely abort an autonomous landing."]
1411    MAV_CMD_DO_GO_AROUND = 191,
1412    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1413    MAV_CMD_DO_REPOSITION = 192,
1414    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1415    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1416    #[doc = "Set moving direction to forward or reverse."]
1417    MAV_CMD_DO_SET_REVERSE = 194,
1418    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1419    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1420    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1421    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1422    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1423    MAV_CMD_DO_SET_ROI_NONE = 197,
1424    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1425    MAV_CMD_DO_SET_ROI_SYSID = 198,
1426    #[doc = "Control onboard camera system."]
1427    MAV_CMD_DO_CONTROL_VIDEO = 200,
1428    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1429    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1430    MAV_CMD_DO_SET_ROI = 201,
1431    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1432    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1433    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1434    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1435    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1436    #[doc = "Mission command to configure a camera or antenna mount"]
1437    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1438    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1439    #[doc = "Mission command to control a camera or antenna mount"]
1440    MAV_CMD_DO_MOUNT_CONTROL = 205,
1441    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1442    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1443    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1444    MAV_CMD_DO_FENCE_ENABLE = 207,
1445    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1446    MAV_CMD_DO_PARACHUTE = 208,
1447    #[doc = "Command to perform motor test."]
1448    MAV_CMD_DO_MOTOR_TEST = 209,
1449    #[doc = "Change to/from inverted flight."]
1450    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1451    #[doc = "Mission command to operate a gripper."]
1452    MAV_CMD_DO_GRIPPER = 211,
1453    #[doc = "Enable/disable autotune."]
1454    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1455    #[doc = "Sets a desired vehicle turn angle and speed change."]
1456    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1457    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1458    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1459    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1460    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1461    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1462    #[doc = "set id of master controller"]
1463    MAV_CMD_DO_GUIDED_MASTER = 221,
1464    #[doc = "Set limits for external control"]
1465    MAV_CMD_DO_GUIDED_LIMITS = 222,
1466    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1467    MAV_CMD_DO_ENGINE_CONTROL = 223,
1468    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1469    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1470    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1471    MAV_CMD_DO_LAST = 240,
1472    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1473    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1474    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1475    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1476    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1477    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1478    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1479    MAV_CMD_PREFLIGHT_STORAGE = 245,
1480    #[doc = "Request the reboot or shutdown of system components."]
1481    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1482    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1483    MAV_CMD_OVERRIDE_GOTO = 252,
1484    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1485    MAV_CMD_OBLIQUE_SURVEY = 260,
1486    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1487    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1488    #[doc = "start running a mission"]
1489    MAV_CMD_MISSION_START = 300,
1490    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1491    MAV_CMD_ACTUATOR_TEST = 310,
1492    #[doc = "Actuator configuration command."]
1493    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1494    #[doc = "Arms / Disarms a component"]
1495    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1496    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1497    MAV_CMD_RUN_PREARM_CHECKS = 401,
1498    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1499    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1500    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1501    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1502    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1503    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1504    MAV_CMD_GET_HOME_POSITION = 410,
1505    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1506    MAV_CMD_INJECT_FAILURE = 420,
1507    #[doc = "Starts receiver pairing."]
1508    MAV_CMD_START_RX_PAIR = 500,
1509    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1510    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1511    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1512    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1513    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1514    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1515    MAV_CMD_REQUEST_MESSAGE = 512,
1516    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1517    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1518    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1519    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1520    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1521    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1522    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1523    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1524    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1525    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1526    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1527    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1528    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1529    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1530    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1531    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1532    MAV_CMD_STORAGE_FORMAT = 526,
1533    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1534    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1535    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1536    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1537    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1538    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1539    #[doc = "Reset all camera settings to Factory Default"]
1540    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1541    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1542    MAV_CMD_SET_CAMERA_MODE = 530,
1543    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1544    MAV_CMD_SET_CAMERA_ZOOM = 531,
1545    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1546    MAV_CMD_SET_CAMERA_FOCUS = 532,
1547    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1548    MAV_CMD_SET_STORAGE_USAGE = 533,
1549    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1550    MAV_CMD_SET_CAMERA_SOURCE = 534,
1551    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1552    MAV_CMD_JUMP_TAG = 600,
1553    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1554    MAV_CMD_DO_JUMP_TAG = 601,
1555    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1556    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1557    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1558    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1559    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1560    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1561    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1562    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1563    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1564    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1565    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1566    #[doc = "Enable or disable on-board camera triggering system."]
1567    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1568    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1569    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1570    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1571    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1572    #[doc = "Stops ongoing tracking."]
1573    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1574    #[doc = "Starts video capture (recording)."]
1575    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1576    #[doc = "Stop the current video capture (recording)."]
1577    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1578    #[doc = "Start video streaming"]
1579    MAV_CMD_VIDEO_START_STREAMING = 2502,
1580    #[doc = "Stop the given video stream"]
1581    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1582    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1583    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1584    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1585    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1586    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1587    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1588    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1589    MAV_CMD_LOGGING_START = 2510,
1590    #[doc = "Request to stop streaming log data over MAVLink"]
1591    MAV_CMD_LOGGING_STOP = 2511,
1592    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1593    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1594    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1595    #[doc = "Create a panorama at the current position"]
1596    MAV_CMD_PANORAMA_CREATE = 2800,
1597    #[doc = "Request VTOL transition"]
1598    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1599    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1600    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1601    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1602    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1603    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1604    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1605    #[doc = "Delay mission state machine until gate has been reached."]
1606    MAV_CMD_CONDITION_GATE = 4501,
1607    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1608    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1609    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1610    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1611    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1612    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1613    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1614    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1615    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1616    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1617    #[doc = "Rally point. You can have multiple rally points defined."]
1618    MAV_CMD_NAV_RALLY_POINT = 5100,
1619    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1620    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1621    #[doc = "Change state of safety switch."]
1622    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1623    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1624    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1625    #[deprecated = "  (Deprecated since 2021-06)"]
1626    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1627    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1628    #[deprecated = "  (Deprecated since 2021-06)"]
1629    #[doc = "Control the payload deployment."]
1630    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1631    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1632    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1633    #[doc = "Command to operate winch."]
1634    MAV_CMD_DO_WINCH = 42600,
1635    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1636    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1637    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1638    MAV_CMD_WAYPOINT_USER_1 = 31000,
1639    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1640    MAV_CMD_WAYPOINT_USER_2 = 31001,
1641    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1642    MAV_CMD_WAYPOINT_USER_3 = 31002,
1643    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1644    MAV_CMD_WAYPOINT_USER_4 = 31003,
1645    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1646    MAV_CMD_WAYPOINT_USER_5 = 31004,
1647    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1648    MAV_CMD_SPATIAL_USER_1 = 31005,
1649    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1650    MAV_CMD_SPATIAL_USER_2 = 31006,
1651    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1652    MAV_CMD_SPATIAL_USER_3 = 31007,
1653    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1654    MAV_CMD_SPATIAL_USER_4 = 31008,
1655    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1656    MAV_CMD_SPATIAL_USER_5 = 31009,
1657    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1658    MAV_CMD_USER_1 = 31010,
1659    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1660    MAV_CMD_USER_2 = 31011,
1661    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1662    MAV_CMD_USER_3 = 31012,
1663    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1664    MAV_CMD_USER_4 = 31013,
1665    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1666    MAV_CMD_USER_5 = 31014,
1667    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1668    MAV_CMD_CAN_FORWARD = 32000,
1669}
1670impl MavCmd {
1671    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1672}
1673impl Default for MavCmd {
1674    fn default() -> Self {
1675        Self::DEFAULT
1676    }
1677}
1678#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1679#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1680#[cfg_attr(feature = "serde", serde(tag = "type"))]
1681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1682#[repr(u32)]
1683#[doc = "Possible actions an aircraft can take to avoid a collision."]
1684pub enum MavCollisionAction {
1685    #[doc = "Ignore any potential collisions"]
1686    MAV_COLLISION_ACTION_NONE = 0,
1687    #[doc = "Report potential collision"]
1688    MAV_COLLISION_ACTION_REPORT = 1,
1689    #[doc = "Ascend or Descend to avoid threat"]
1690    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1691    #[doc = "Move horizontally to avoid threat"]
1692    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1693    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1694    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1695    #[doc = "Aircraft to fly directly back to its launch point"]
1696    MAV_COLLISION_ACTION_RTL = 5,
1697    #[doc = "Aircraft to stop in place"]
1698    MAV_COLLISION_ACTION_HOVER = 6,
1699}
1700impl MavCollisionAction {
1701    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1702}
1703impl Default for MavCollisionAction {
1704    fn default() -> Self {
1705        Self::DEFAULT
1706    }
1707}
1708#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1709#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1710#[cfg_attr(feature = "serde", serde(tag = "type"))]
1711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1712#[repr(u32)]
1713#[doc = "Source of information about this collision."]
1714pub enum MavCollisionSrc {
1715    #[doc = "ID field references ADSB_VEHICLE packets"]
1716    MAV_COLLISION_SRC_ADSB = 0,
1717    #[doc = "ID field references MAVLink SRC ID"]
1718    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1719}
1720impl MavCollisionSrc {
1721    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1722}
1723impl Default for MavCollisionSrc {
1724    fn default() -> Self {
1725        Self::DEFAULT
1726    }
1727}
1728#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1730#[cfg_attr(feature = "serde", serde(tag = "type"))]
1731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1732#[repr(u32)]
1733#[doc = "Aircraft-rated danger from this threat."]
1734pub enum MavCollisionThreatLevel {
1735    #[doc = "Not a threat"]
1736    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1737    #[doc = "Craft is mildly concerned about this threat"]
1738    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1739    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1740    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1741}
1742impl MavCollisionThreatLevel {
1743    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1744}
1745impl Default for MavCollisionThreatLevel {
1746    fn default() -> Self {
1747        Self::DEFAULT
1748    }
1749}
1750#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1752#[cfg_attr(feature = "serde", serde(tag = "type"))]
1753#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1754#[repr(u32)]
1755#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1756pub enum MavComponent {
1757    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1758    MAV_COMP_ID_ALL = 0,
1759    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1760    MAV_COMP_ID_AUTOPILOT1 = 1,
1761    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1762    MAV_COMP_ID_USER1 = 25,
1763    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1764    MAV_COMP_ID_USER2 = 26,
1765    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1766    MAV_COMP_ID_USER3 = 27,
1767    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1768    MAV_COMP_ID_USER4 = 28,
1769    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1770    MAV_COMP_ID_USER5 = 29,
1771    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1772    MAV_COMP_ID_USER6 = 30,
1773    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1774    MAV_COMP_ID_USER7 = 31,
1775    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1776    MAV_COMP_ID_USER8 = 32,
1777    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1778    MAV_COMP_ID_USER9 = 33,
1779    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1780    MAV_COMP_ID_USER10 = 34,
1781    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1782    MAV_COMP_ID_USER11 = 35,
1783    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1784    MAV_COMP_ID_USER12 = 36,
1785    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1786    MAV_COMP_ID_USER13 = 37,
1787    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1788    MAV_COMP_ID_USER14 = 38,
1789    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1790    MAV_COMP_ID_USER15 = 39,
1791    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1792    MAV_COMP_ID_USER16 = 40,
1793    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1794    MAV_COMP_ID_USER17 = 41,
1795    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1796    MAV_COMP_ID_USER18 = 42,
1797    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1798    MAV_COMP_ID_USER19 = 43,
1799    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1800    MAV_COMP_ID_USER20 = 44,
1801    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1802    MAV_COMP_ID_USER21 = 45,
1803    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1804    MAV_COMP_ID_USER22 = 46,
1805    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1806    MAV_COMP_ID_USER23 = 47,
1807    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1808    MAV_COMP_ID_USER24 = 48,
1809    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1810    MAV_COMP_ID_USER25 = 49,
1811    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1812    MAV_COMP_ID_USER26 = 50,
1813    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1814    MAV_COMP_ID_USER27 = 51,
1815    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1816    MAV_COMP_ID_USER28 = 52,
1817    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1818    MAV_COMP_ID_USER29 = 53,
1819    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1820    MAV_COMP_ID_USER30 = 54,
1821    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1822    MAV_COMP_ID_USER31 = 55,
1823    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1824    MAV_COMP_ID_USER32 = 56,
1825    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1826    MAV_COMP_ID_USER33 = 57,
1827    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1828    MAV_COMP_ID_USER34 = 58,
1829    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1830    MAV_COMP_ID_USER35 = 59,
1831    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1832    MAV_COMP_ID_USER36 = 60,
1833    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1834    MAV_COMP_ID_USER37 = 61,
1835    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1836    MAV_COMP_ID_USER38 = 62,
1837    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1838    MAV_COMP_ID_USER39 = 63,
1839    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1840    MAV_COMP_ID_USER40 = 64,
1841    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1842    MAV_COMP_ID_USER41 = 65,
1843    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1844    MAV_COMP_ID_USER42 = 66,
1845    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1846    MAV_COMP_ID_USER43 = 67,
1847    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1848    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1849    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1850    MAV_COMP_ID_USER45 = 69,
1851    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1852    MAV_COMP_ID_USER46 = 70,
1853    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1854    MAV_COMP_ID_USER47 = 71,
1855    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1856    MAV_COMP_ID_USER48 = 72,
1857    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1858    MAV_COMP_ID_USER49 = 73,
1859    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1860    MAV_COMP_ID_USER50 = 74,
1861    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1862    MAV_COMP_ID_USER51 = 75,
1863    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1864    MAV_COMP_ID_USER52 = 76,
1865    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1866    MAV_COMP_ID_USER53 = 77,
1867    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1868    MAV_COMP_ID_USER54 = 78,
1869    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1870    MAV_COMP_ID_USER55 = 79,
1871    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1872    MAV_COMP_ID_USER56 = 80,
1873    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1874    MAV_COMP_ID_USER57 = 81,
1875    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1876    MAV_COMP_ID_USER58 = 82,
1877    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1878    MAV_COMP_ID_USER59 = 83,
1879    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1880    MAV_COMP_ID_USER60 = 84,
1881    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1882    MAV_COMP_ID_USER61 = 85,
1883    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1884    MAV_COMP_ID_USER62 = 86,
1885    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1886    MAV_COMP_ID_USER63 = 87,
1887    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1888    MAV_COMP_ID_USER64 = 88,
1889    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1890    MAV_COMP_ID_USER65 = 89,
1891    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1892    MAV_COMP_ID_USER66 = 90,
1893    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1894    MAV_COMP_ID_USER67 = 91,
1895    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1896    MAV_COMP_ID_USER68 = 92,
1897    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1898    MAV_COMP_ID_USER69 = 93,
1899    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1900    MAV_COMP_ID_USER70 = 94,
1901    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1902    MAV_COMP_ID_USER71 = 95,
1903    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1904    MAV_COMP_ID_USER72 = 96,
1905    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1906    MAV_COMP_ID_USER73 = 97,
1907    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1908    MAV_COMP_ID_USER74 = 98,
1909    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1910    MAV_COMP_ID_USER75 = 99,
1911    #[doc = "Camera #1."]
1912    MAV_COMP_ID_CAMERA = 100,
1913    #[doc = "Camera #2."]
1914    MAV_COMP_ID_CAMERA2 = 101,
1915    #[doc = "Camera #3."]
1916    MAV_COMP_ID_CAMERA3 = 102,
1917    #[doc = "Camera #4."]
1918    MAV_COMP_ID_CAMERA4 = 103,
1919    #[doc = "Camera #5."]
1920    MAV_COMP_ID_CAMERA5 = 104,
1921    #[doc = "Camera #6."]
1922    MAV_COMP_ID_CAMERA6 = 105,
1923    #[doc = "Servo #1."]
1924    MAV_COMP_ID_SERVO1 = 140,
1925    #[doc = "Servo #2."]
1926    MAV_COMP_ID_SERVO2 = 141,
1927    #[doc = "Servo #3."]
1928    MAV_COMP_ID_SERVO3 = 142,
1929    #[doc = "Servo #4."]
1930    MAV_COMP_ID_SERVO4 = 143,
1931    #[doc = "Servo #5."]
1932    MAV_COMP_ID_SERVO5 = 144,
1933    #[doc = "Servo #6."]
1934    MAV_COMP_ID_SERVO6 = 145,
1935    #[doc = "Servo #7."]
1936    MAV_COMP_ID_SERVO7 = 146,
1937    #[doc = "Servo #8."]
1938    MAV_COMP_ID_SERVO8 = 147,
1939    #[doc = "Servo #9."]
1940    MAV_COMP_ID_SERVO9 = 148,
1941    #[doc = "Servo #10."]
1942    MAV_COMP_ID_SERVO10 = 149,
1943    #[doc = "Servo #11."]
1944    MAV_COMP_ID_SERVO11 = 150,
1945    #[doc = "Servo #12."]
1946    MAV_COMP_ID_SERVO12 = 151,
1947    #[doc = "Servo #13."]
1948    MAV_COMP_ID_SERVO13 = 152,
1949    #[doc = "Servo #14."]
1950    MAV_COMP_ID_SERVO14 = 153,
1951    #[doc = "Gimbal #1."]
1952    MAV_COMP_ID_GIMBAL = 154,
1953    #[doc = "Logging component."]
1954    MAV_COMP_ID_LOG = 155,
1955    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
1956    MAV_COMP_ID_ADSB = 156,
1957    #[doc = "On Screen Display (OSD) devices for video links."]
1958    MAV_COMP_ID_OSD = 157,
1959    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
1960    MAV_COMP_ID_PERIPHERAL = 158,
1961    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
1962    #[doc = "Gimbal ID for QX1."]
1963    MAV_COMP_ID_QX1_GIMBAL = 159,
1964    #[doc = "FLARM collision alert component."]
1965    MAV_COMP_ID_FLARM = 160,
1966    #[doc = "Parachute component."]
1967    MAV_COMP_ID_PARACHUTE = 161,
1968    #[doc = "Winch component."]
1969    MAV_COMP_ID_WINCH = 169,
1970    #[doc = "Gimbal #2."]
1971    MAV_COMP_ID_GIMBAL2 = 171,
1972    #[doc = "Gimbal #3."]
1973    MAV_COMP_ID_GIMBAL3 = 172,
1974    #[doc = "Gimbal #4"]
1975    MAV_COMP_ID_GIMBAL4 = 173,
1976    #[doc = "Gimbal #5."]
1977    MAV_COMP_ID_GIMBAL5 = 174,
1978    #[doc = "Gimbal #6."]
1979    MAV_COMP_ID_GIMBAL6 = 175,
1980    #[doc = "Battery #1."]
1981    MAV_COMP_ID_BATTERY = 180,
1982    #[doc = "Battery #2."]
1983    MAV_COMP_ID_BATTERY2 = 181,
1984    #[doc = "CAN over MAVLink client."]
1985    MAV_COMP_ID_MAVCAN = 189,
1986    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
1987    MAV_COMP_ID_MISSIONPLANNER = 190,
1988    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1989    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
1990    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1991    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
1992    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1993    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
1994    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1995    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
1996    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
1997    MAV_COMP_ID_PATHPLANNER = 195,
1998    #[doc = "Component that plans a collision free path between two points."]
1999    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2000    #[doc = "Component that provides position estimates using VIO techniques."]
2001    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2002    #[doc = "Component that manages pairing of vehicle and GCS."]
2003    MAV_COMP_ID_PAIRING_MANAGER = 198,
2004    #[doc = "Inertial Measurement Unit (IMU) #1."]
2005    MAV_COMP_ID_IMU = 200,
2006    #[doc = "Inertial Measurement Unit (IMU) #2."]
2007    MAV_COMP_ID_IMU_2 = 201,
2008    #[doc = "Inertial Measurement Unit (IMU) #3."]
2009    MAV_COMP_ID_IMU_3 = 202,
2010    #[doc = "GPS #1."]
2011    MAV_COMP_ID_GPS = 220,
2012    #[doc = "GPS #2."]
2013    MAV_COMP_ID_GPS2 = 221,
2014    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2015    MAV_COMP_ID_ODID_TXRX_1 = 236,
2016    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2017    MAV_COMP_ID_ODID_TXRX_2 = 237,
2018    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2019    MAV_COMP_ID_ODID_TXRX_3 = 238,
2020    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2021    MAV_COMP_ID_UDP_BRIDGE = 240,
2022    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2023    MAV_COMP_ID_UART_BRIDGE = 241,
2024    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2025    MAV_COMP_ID_TUNNEL_NODE = 242,
2026    #[doc = "Illuminator"]
2027    MAV_COMP_ID_ILLUMINATOR = 243,
2028    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2029    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2030    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2031}
2032impl MavComponent {
2033    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2034}
2035impl Default for MavComponent {
2036    fn default() -> Self {
2037        Self::DEFAULT
2038    }
2039}
2040#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2041#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2042#[cfg_attr(feature = "serde", serde(tag = "type"))]
2043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2044#[repr(u32)]
2045#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2046#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2047pub enum MavDataStream {
2048    #[doc = "Enable all data streams"]
2049    MAV_DATA_STREAM_ALL = 0,
2050    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2051    MAV_DATA_STREAM_RAW_SENSORS = 1,
2052    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2053    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2054    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2055    MAV_DATA_STREAM_RC_CHANNELS = 3,
2056    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2057    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2058    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2059    MAV_DATA_STREAM_POSITION = 6,
2060    #[doc = "Dependent on the autopilot"]
2061    MAV_DATA_STREAM_EXTRA1 = 10,
2062    #[doc = "Dependent on the autopilot"]
2063    MAV_DATA_STREAM_EXTRA2 = 11,
2064    #[doc = "Dependent on the autopilot"]
2065    MAV_DATA_STREAM_EXTRA3 = 12,
2066}
2067impl MavDataStream {
2068    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2069}
2070impl Default for MavDataStream {
2071    fn default() -> Self {
2072        Self::DEFAULT
2073    }
2074}
2075#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2077#[cfg_attr(feature = "serde", serde(tag = "type"))]
2078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2079#[repr(u32)]
2080#[doc = "Enumeration of distance sensor types"]
2081pub enum MavDistanceSensor {
2082    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2083    MAV_DISTANCE_SENSOR_LASER = 0,
2084    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2085    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2086    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2087    MAV_DISTANCE_SENSOR_INFRARED = 2,
2088    #[doc = "Radar type, e.g. uLanding units"]
2089    MAV_DISTANCE_SENSOR_RADAR = 3,
2090    #[doc = "Broken or unknown type, e.g. analog units"]
2091    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2092}
2093impl MavDistanceSensor {
2094    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2095}
2096impl Default for MavDistanceSensor {
2097    fn default() -> Self {
2098        Self::DEFAULT
2099    }
2100}
2101#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2103#[cfg_attr(feature = "serde", serde(tag = "type"))]
2104#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2105#[repr(u32)]
2106#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2107pub enum MavDoRepositionFlags {
2108    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2109    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2110}
2111impl MavDoRepositionFlags {
2112    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2113}
2114impl Default for MavDoRepositionFlags {
2115    fn default() -> Self {
2116        Self::DEFAULT
2117    }
2118}
2119#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2120#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2121#[cfg_attr(feature = "serde", serde(tag = "type"))]
2122#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2123#[repr(u32)]
2124#[doc = "Enumeration of estimator types"]
2125pub enum MavEstimatorType {
2126    #[doc = "Unknown type of the estimator."]
2127    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2128    #[doc = "This is a naive estimator without any real covariance feedback."]
2129    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2130    #[doc = "Computer vision based estimate. Might be up to scale."]
2131    MAV_ESTIMATOR_TYPE_VISION = 2,
2132    #[doc = "Visual-inertial estimate."]
2133    MAV_ESTIMATOR_TYPE_VIO = 3,
2134    #[doc = "Plain GPS estimate."]
2135    MAV_ESTIMATOR_TYPE_GPS = 4,
2136    #[doc = "Estimator integrating GPS and inertial sensing."]
2137    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2138    #[doc = "Estimate from external motion capturing system."]
2139    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2140    #[doc = "Estimator based on lidar sensor input."]
2141    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2142    #[doc = "Estimator on autopilot."]
2143    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2144}
2145impl MavEstimatorType {
2146    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2147}
2148impl Default for MavEstimatorType {
2149    fn default() -> Self {
2150        Self::DEFAULT
2151    }
2152}
2153#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2154#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2155#[cfg_attr(feature = "serde", serde(tag = "type"))]
2156#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2157#[repr(u32)]
2158#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2159pub enum MavEventCurrentSequenceFlags {
2160    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2161    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2162}
2163impl MavEventCurrentSequenceFlags {
2164    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2165}
2166impl Default for MavEventCurrentSequenceFlags {
2167    fn default() -> Self {
2168        Self::DEFAULT
2169    }
2170}
2171#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2172#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2173#[cfg_attr(feature = "serde", serde(tag = "type"))]
2174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2175#[repr(u32)]
2176#[doc = "Reason for an event error response."]
2177pub enum MavEventErrorReason {
2178    #[doc = "The requested event is not available (anymore)."]
2179    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2180}
2181impl MavEventErrorReason {
2182    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2183}
2184impl Default for MavEventErrorReason {
2185    fn default() -> Self {
2186        Self::DEFAULT
2187    }
2188}
2189#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2190#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2191#[cfg_attr(feature = "serde", serde(tag = "type"))]
2192#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2193#[repr(u32)]
2194#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2195pub enum MavFrame {
2196    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2197    MAV_FRAME_GLOBAL = 0,
2198    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2199    MAV_FRAME_LOCAL_NED = 1,
2200    #[doc = "NOT a coordinate frame, indicates a mission command."]
2201    MAV_FRAME_MISSION = 2,
2202    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2203    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2204    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2205    MAV_FRAME_LOCAL_ENU = 4,
2206    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2207    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2208    MAV_FRAME_GLOBAL_INT = 5,
2209    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2210    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2211    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2212    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2213    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2214    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2215    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2216    MAV_FRAME_BODY_NED = 8,
2217    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2218    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2219    MAV_FRAME_BODY_OFFSET_NED = 9,
2220    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2221    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2222    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2223    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2224    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2225    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2226    MAV_FRAME_BODY_FRD = 12,
2227    #[deprecated = "  (Deprecated since 2019-04)"]
2228    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2229    MAV_FRAME_RESERVED_13 = 13,
2230    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2231    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2232    MAV_FRAME_RESERVED_14 = 14,
2233    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2234    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2235    MAV_FRAME_RESERVED_15 = 15,
2236    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2237    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2238    MAV_FRAME_RESERVED_16 = 16,
2239    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2240    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2241    MAV_FRAME_RESERVED_17 = 17,
2242    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2243    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2244    MAV_FRAME_RESERVED_18 = 18,
2245    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2246    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2247    MAV_FRAME_RESERVED_19 = 19,
2248    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2249    MAV_FRAME_LOCAL_FRD = 20,
2250    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2251    MAV_FRAME_LOCAL_FLU = 21,
2252}
2253impl MavFrame {
2254    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2255}
2256impl Default for MavFrame {
2257    fn default() -> Self {
2258        Self::DEFAULT
2259    }
2260}
2261#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2263#[cfg_attr(feature = "serde", serde(tag = "type"))]
2264#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2265#[repr(u32)]
2266#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2267pub enum MavFtpErr {
2268    #[doc = "None: No error"]
2269    MAV_FTP_ERR_NONE = 0,
2270    #[doc = "Fail: Unknown failure"]
2271    MAV_FTP_ERR_FAIL = 1,
2272    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2273    MAV_FTP_ERR_FAILERRNO = 2,
2274    #[doc = "InvalidDataSize: Payload size is invalid"]
2275    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2276    #[doc = "InvalidSession: Session is not currently open"]
2277    MAV_FTP_ERR_INVALIDSESSION = 4,
2278    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2279    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2280    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2281    MAV_FTP_ERR_EOF = 6,
2282    #[doc = "UnknownCommand: Unknown command / opcode"]
2283    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2284    #[doc = "FileExists: File/directory already exists"]
2285    MAV_FTP_ERR_FILEEXISTS = 8,
2286    #[doc = "FileProtected: File/directory is write protected"]
2287    MAV_FTP_ERR_FILEPROTECTED = 9,
2288    #[doc = "FileNotFound: File/directory not found"]
2289    MAV_FTP_ERR_FILENOTFOUND = 10,
2290}
2291impl MavFtpErr {
2292    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2293}
2294impl Default for MavFtpErr {
2295    fn default() -> Self {
2296        Self::DEFAULT
2297    }
2298}
2299#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2301#[cfg_attr(feature = "serde", serde(tag = "type"))]
2302#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2303#[repr(u32)]
2304#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2305pub enum MavFtpOpcode {
2306    #[doc = "None. Ignored, always ACKed"]
2307    MAV_FTP_OPCODE_NONE = 0,
2308    #[doc = "TerminateSession: Terminates open Read session"]
2309    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2310    #[doc = "ResetSessions: Terminates all open read sessions"]
2311    MAV_FTP_OPCODE_RESETSESSION = 2,
2312    #[doc = "ListDirectory. List files and directories in path from offset"]
2313    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2314    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2315    MAV_FTP_OPCODE_OPENFILERO = 4,
2316    #[doc = "ReadFile: Reads size bytes from offset in session"]
2317    MAV_FTP_OPCODE_READFILE = 5,
2318    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2319    MAV_FTP_OPCODE_CREATEFILE = 6,
2320    #[doc = "WriteFile: Writes size bytes to offset in session"]
2321    MAV_FTP_OPCODE_WRITEFILE = 7,
2322    #[doc = "RemoveFile: Remove file at path"]
2323    MAV_FTP_OPCODE_REMOVEFILE = 8,
2324    #[doc = "CreateDirectory: Creates directory at path"]
2325    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2326    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2327    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2328    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2329    MAV_FTP_OPCODE_OPENFILEWO = 11,
2330    #[doc = "TruncateFile: Truncate file at path to offset length"]
2331    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2332    #[doc = "Rename: Rename path1 to path2"]
2333    MAV_FTP_OPCODE_RENAME = 13,
2334    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2335    MAV_FTP_OPCODE_CALCFILECRC = 14,
2336    #[doc = "BurstReadFile: Burst download session file"]
2337    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2338    #[doc = "ACK: ACK response"]
2339    MAV_FTP_OPCODE_ACK = 128,
2340    #[doc = "NAK: NAK response"]
2341    MAV_FTP_OPCODE_NAK = 129,
2342}
2343impl MavFtpOpcode {
2344    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2345}
2346impl Default for MavFtpOpcode {
2347    fn default() -> Self {
2348        Self::DEFAULT
2349    }
2350}
2351#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2352#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2353#[cfg_attr(feature = "serde", serde(tag = "type"))]
2354#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2355#[repr(u32)]
2356#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2357pub enum MavFuelType {
2358    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2359    MAV_FUEL_TYPE_UNKNOWN = 0,
2360    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2361    MAV_FUEL_TYPE_LIQUID = 1,
2362    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2363    MAV_FUEL_TYPE_GAS = 2,
2364}
2365impl MavFuelType {
2366    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2367}
2368impl Default for MavFuelType {
2369    fn default() -> Self {
2370        Self::DEFAULT
2371    }
2372}
2373bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2374impl MavGeneratorStatusFlag {
2375    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2376}
2377impl Default for MavGeneratorStatusFlag {
2378    fn default() -> Self {
2379        Self::DEFAULT
2380    }
2381}
2382#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2383#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2384#[cfg_attr(feature = "serde", serde(tag = "type"))]
2385#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2386#[repr(u32)]
2387#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2388pub enum MavGoto {
2389    #[doc = "Hold at the current position."]
2390    MAV_GOTO_DO_HOLD = 0,
2391    #[doc = "Continue with the next item in mission execution."]
2392    MAV_GOTO_DO_CONTINUE = 1,
2393    #[doc = "Hold at the current position of the system"]
2394    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2395    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2396    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2397}
2398impl MavGoto {
2399    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2400}
2401impl Default for MavGoto {
2402    fn default() -> Self {
2403        Self::DEFAULT
2404    }
2405}
2406#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2408#[cfg_attr(feature = "serde", serde(tag = "type"))]
2409#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2410#[repr(u32)]
2411#[doc = "Enumeration of landed detector states"]
2412pub enum MavLandedState {
2413    #[doc = "MAV landed state is unknown"]
2414    MAV_LANDED_STATE_UNDEFINED = 0,
2415    #[doc = "MAV is landed (on ground)"]
2416    MAV_LANDED_STATE_ON_GROUND = 1,
2417    #[doc = "MAV is in air"]
2418    MAV_LANDED_STATE_IN_AIR = 2,
2419    #[doc = "MAV currently taking off"]
2420    MAV_LANDED_STATE_TAKEOFF = 3,
2421    #[doc = "MAV currently landing"]
2422    MAV_LANDED_STATE_LANDING = 4,
2423}
2424impl MavLandedState {
2425    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2426}
2427impl Default for MavLandedState {
2428    fn default() -> Self {
2429        Self::DEFAULT
2430    }
2431}
2432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2434#[cfg_attr(feature = "serde", serde(tag = "type"))]
2435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2436#[repr(u32)]
2437#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2438pub enum MavMissionResult {
2439    #[doc = "mission accepted OK"]
2440    MAV_MISSION_ACCEPTED = 0,
2441    #[doc = "Generic error / not accepting mission commands at all right now."]
2442    MAV_MISSION_ERROR = 1,
2443    #[doc = "Coordinate frame is not supported."]
2444    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2445    #[doc = "Command is not supported."]
2446    MAV_MISSION_UNSUPPORTED = 3,
2447    #[doc = "Mission items exceed storage space."]
2448    MAV_MISSION_NO_SPACE = 4,
2449    #[doc = "One of the parameters has an invalid value."]
2450    MAV_MISSION_INVALID = 5,
2451    #[doc = "param1 has an invalid value."]
2452    MAV_MISSION_INVALID_PARAM1 = 6,
2453    #[doc = "param2 has an invalid value."]
2454    MAV_MISSION_INVALID_PARAM2 = 7,
2455    #[doc = "param3 has an invalid value."]
2456    MAV_MISSION_INVALID_PARAM3 = 8,
2457    #[doc = "param4 has an invalid value."]
2458    MAV_MISSION_INVALID_PARAM4 = 9,
2459    #[doc = "x / param5 has an invalid value."]
2460    MAV_MISSION_INVALID_PARAM5_X = 10,
2461    #[doc = "y / param6 has an invalid value."]
2462    MAV_MISSION_INVALID_PARAM6_Y = 11,
2463    #[doc = "z / param7 has an invalid value."]
2464    MAV_MISSION_INVALID_PARAM7 = 12,
2465    #[doc = "Mission item received out of sequence"]
2466    MAV_MISSION_INVALID_SEQUENCE = 13,
2467    #[doc = "Not accepting any mission commands from this communication partner."]
2468    MAV_MISSION_DENIED = 14,
2469    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2470    MAV_MISSION_OPERATION_CANCELLED = 15,
2471}
2472impl MavMissionResult {
2473    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2474}
2475impl Default for MavMissionResult {
2476    fn default() -> Self {
2477        Self::DEFAULT
2478    }
2479}
2480#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2481#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2482#[cfg_attr(feature = "serde", serde(tag = "type"))]
2483#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2484#[repr(u32)]
2485#[doc = "Type of mission items being requested/sent in mission protocol."]
2486pub enum MavMissionType {
2487    #[doc = "Items are mission commands for main mission."]
2488    MAV_MISSION_TYPE_MISSION = 0,
2489    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2490    MAV_MISSION_TYPE_FENCE = 1,
2491    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2492    MAV_MISSION_TYPE_RALLY = 2,
2493    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2494    MAV_MISSION_TYPE_ALL = 255,
2495}
2496impl MavMissionType {
2497    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2498}
2499impl Default for MavMissionType {
2500    fn default() -> Self {
2501        Self::DEFAULT
2502    }
2503}
2504#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2505#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2506#[cfg_attr(feature = "serde", serde(tag = "type"))]
2507#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2508#[repr(u32)]
2509#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2510pub enum MavMode {
2511    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2512    MAV_MODE_PREFLIGHT = 0,
2513    #[doc = "System is allowed to be active, under assisted RC control."]
2514    MAV_MODE_STABILIZE_DISARMED = 80,
2515    #[doc = "System is allowed to be active, under assisted RC control."]
2516    MAV_MODE_STABILIZE_ARMED = 208,
2517    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2518    MAV_MODE_MANUAL_DISARMED = 64,
2519    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2520    MAV_MODE_MANUAL_ARMED = 192,
2521    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2522    MAV_MODE_GUIDED_DISARMED = 88,
2523    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2524    MAV_MODE_GUIDED_ARMED = 216,
2525    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2526    MAV_MODE_AUTO_DISARMED = 92,
2527    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2528    MAV_MODE_AUTO_ARMED = 220,
2529    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2530    MAV_MODE_TEST_DISARMED = 66,
2531    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2532    MAV_MODE_TEST_ARMED = 194,
2533}
2534impl MavMode {
2535    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2536}
2537impl Default for MavMode {
2538    fn default() -> Self {
2539        Self::DEFAULT
2540    }
2541}
2542bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2543impl MavModeFlag {
2544    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2545}
2546impl Default for MavModeFlag {
2547    fn default() -> Self {
2548        Self::DEFAULT
2549    }
2550}
2551#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2553#[cfg_attr(feature = "serde", serde(tag = "type"))]
2554#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2555#[repr(u32)]
2556#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2557pub enum MavModeFlagDecodePosition {
2558    #[doc = "First bit:  10000000"]
2559    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2560    #[doc = "Second bit: 01000000"]
2561    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2562    #[doc = "Third bit:  00100000"]
2563    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2564    #[doc = "Fourth bit: 00010000"]
2565    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2566    #[doc = "Fifth bit:  00001000"]
2567    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2568    #[doc = "Sixth bit:   00000100"]
2569    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2570    #[doc = "Seventh bit: 00000010"]
2571    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2572    #[doc = "Eighth bit: 00000001"]
2573    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2574}
2575impl MavModeFlagDecodePosition {
2576    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2577}
2578impl Default for MavModeFlagDecodePosition {
2579    fn default() -> Self {
2580        Self::DEFAULT
2581    }
2582}
2583bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2584impl MavModeProperty {
2585    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2586}
2587impl Default for MavModeProperty {
2588    fn default() -> Self {
2589        Self::DEFAULT
2590    }
2591}
2592#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2594#[cfg_attr(feature = "serde", serde(tag = "type"))]
2595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2596#[repr(u32)]
2597#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2598#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2599pub enum MavMountMode {
2600    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2601    MAV_MOUNT_MODE_RETRACT = 0,
2602    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2603    MAV_MOUNT_MODE_NEUTRAL = 1,
2604    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2605    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2606    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2607    MAV_MOUNT_MODE_RC_TARGETING = 3,
2608    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2609    MAV_MOUNT_MODE_GPS_POINT = 4,
2610    #[doc = "Gimbal tracks system with specified system ID"]
2611    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2612    #[doc = "Gimbal tracks home position"]
2613    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2614}
2615impl MavMountMode {
2616    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2617}
2618impl Default for MavMountMode {
2619    fn default() -> Self {
2620        Self::DEFAULT
2621    }
2622}
2623#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2624#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2625#[cfg_attr(feature = "serde", serde(tag = "type"))]
2626#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2627#[repr(u32)]
2628pub enum MavOdidArmStatus {
2629    #[doc = "Passing arming checks."]
2630    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2631    #[doc = "Generic arming failure, see error string for details."]
2632    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2633}
2634impl MavOdidArmStatus {
2635    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2636}
2637impl Default for MavOdidArmStatus {
2638    fn default() -> Self {
2639        Self::DEFAULT
2640    }
2641}
2642#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2643#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2644#[cfg_attr(feature = "serde", serde(tag = "type"))]
2645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2646#[repr(u32)]
2647pub enum MavOdidAuthType {
2648    #[doc = "No authentication type is specified."]
2649    MAV_ODID_AUTH_TYPE_NONE = 0,
2650    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2651    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2652    #[doc = "Signature for the Operator ID."]
2653    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2654    #[doc = "Signature for the entire message set."]
2655    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2656    #[doc = "Authentication is provided by Network Remote ID."]
2657    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2658    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2659    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2660}
2661impl MavOdidAuthType {
2662    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2663}
2664impl Default for MavOdidAuthType {
2665    fn default() -> Self {
2666        Self::DEFAULT
2667    }
2668}
2669#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2670#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2671#[cfg_attr(feature = "serde", serde(tag = "type"))]
2672#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2673#[repr(u32)]
2674pub enum MavOdidCategoryEu {
2675    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2676    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2677    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2678    MAV_ODID_CATEGORY_EU_OPEN = 1,
2679    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2680    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2681    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2682    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2683}
2684impl MavOdidCategoryEu {
2685    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2686}
2687impl Default for MavOdidCategoryEu {
2688    fn default() -> Self {
2689        Self::DEFAULT
2690    }
2691}
2692#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2693#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2694#[cfg_attr(feature = "serde", serde(tag = "type"))]
2695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2696#[repr(u32)]
2697pub enum MavOdidClassEu {
2698    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2699    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2700    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2701    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2702    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2703    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2704    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2705    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2706    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2707    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2708    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2709    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2710    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2711    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2712    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2713    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2714}
2715impl MavOdidClassEu {
2716    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2717}
2718impl Default for MavOdidClassEu {
2719    fn default() -> Self {
2720        Self::DEFAULT
2721    }
2722}
2723#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2724#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2725#[cfg_attr(feature = "serde", serde(tag = "type"))]
2726#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2727#[repr(u32)]
2728pub enum MavOdidClassificationType {
2729    #[doc = "The classification type for the UA is undeclared."]
2730    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2731    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2732    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2733}
2734impl MavOdidClassificationType {
2735    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2736}
2737impl Default for MavOdidClassificationType {
2738    fn default() -> Self {
2739        Self::DEFAULT
2740    }
2741}
2742#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2743#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2744#[cfg_attr(feature = "serde", serde(tag = "type"))]
2745#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2746#[repr(u32)]
2747pub enum MavOdidDescType {
2748    #[doc = "Optional free-form text description of the purpose of the flight."]
2749    MAV_ODID_DESC_TYPE_TEXT = 0,
2750    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2751    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2752    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2753    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2754}
2755impl MavOdidDescType {
2756    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2757}
2758impl Default for MavOdidDescType {
2759    fn default() -> Self {
2760        Self::DEFAULT
2761    }
2762}
2763#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2764#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2765#[cfg_attr(feature = "serde", serde(tag = "type"))]
2766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2767#[repr(u32)]
2768pub enum MavOdidHeightRef {
2769    #[doc = "The height field is relative to the take-off location."]
2770    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2771    #[doc = "The height field is relative to ground."]
2772    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2773}
2774impl MavOdidHeightRef {
2775    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2776}
2777impl Default for MavOdidHeightRef {
2778    fn default() -> Self {
2779        Self::DEFAULT
2780    }
2781}
2782#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2783#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2784#[cfg_attr(feature = "serde", serde(tag = "type"))]
2785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2786#[repr(u32)]
2787pub enum MavOdidHorAcc {
2788    #[doc = "The horizontal accuracy is unknown."]
2789    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2790    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2791    MAV_ODID_HOR_ACC_10NM = 1,
2792    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2793    MAV_ODID_HOR_ACC_4NM = 2,
2794    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2795    MAV_ODID_HOR_ACC_2NM = 3,
2796    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2797    MAV_ODID_HOR_ACC_1NM = 4,
2798    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2799    MAV_ODID_HOR_ACC_0_5NM = 5,
2800    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2801    MAV_ODID_HOR_ACC_0_3NM = 6,
2802    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2803    MAV_ODID_HOR_ACC_0_1NM = 7,
2804    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2805    MAV_ODID_HOR_ACC_0_05NM = 8,
2806    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2807    MAV_ODID_HOR_ACC_30_METER = 9,
2808    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2809    MAV_ODID_HOR_ACC_10_METER = 10,
2810    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2811    MAV_ODID_HOR_ACC_3_METER = 11,
2812    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2813    MAV_ODID_HOR_ACC_1_METER = 12,
2814}
2815impl MavOdidHorAcc {
2816    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2817}
2818impl Default for MavOdidHorAcc {
2819    fn default() -> Self {
2820        Self::DEFAULT
2821    }
2822}
2823#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2824#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2825#[cfg_attr(feature = "serde", serde(tag = "type"))]
2826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2827#[repr(u32)]
2828pub enum MavOdidIdType {
2829    #[doc = "No type defined."]
2830    MAV_ODID_ID_TYPE_NONE = 0,
2831    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2832    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2833    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2834    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2835    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2836    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2837    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2838    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2839}
2840impl MavOdidIdType {
2841    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2842}
2843impl Default for MavOdidIdType {
2844    fn default() -> Self {
2845        Self::DEFAULT
2846    }
2847}
2848#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2850#[cfg_attr(feature = "serde", serde(tag = "type"))]
2851#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2852#[repr(u32)]
2853pub enum MavOdidOperatorIdType {
2854    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2855    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2856}
2857impl MavOdidOperatorIdType {
2858    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2859}
2860impl Default for MavOdidOperatorIdType {
2861    fn default() -> Self {
2862        Self::DEFAULT
2863    }
2864}
2865#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2866#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2867#[cfg_attr(feature = "serde", serde(tag = "type"))]
2868#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2869#[repr(u32)]
2870pub enum MavOdidOperatorLocationType {
2871    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2872    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2873    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2874    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2875    #[doc = "The location/altitude of the operator are fixed values."]
2876    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2877}
2878impl MavOdidOperatorLocationType {
2879    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2880}
2881impl Default for MavOdidOperatorLocationType {
2882    fn default() -> Self {
2883        Self::DEFAULT
2884    }
2885}
2886#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2888#[cfg_attr(feature = "serde", serde(tag = "type"))]
2889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2890#[repr(u32)]
2891pub enum MavOdidSpeedAcc {
2892    #[doc = "The speed accuracy is unknown."]
2893    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2894    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2895    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2896    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2897    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2898    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2899    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2900    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2901    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2902}
2903impl MavOdidSpeedAcc {
2904    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2905}
2906impl Default for MavOdidSpeedAcc {
2907    fn default() -> Self {
2908        Self::DEFAULT
2909    }
2910}
2911#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2912#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2913#[cfg_attr(feature = "serde", serde(tag = "type"))]
2914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2915#[repr(u32)]
2916pub enum MavOdidStatus {
2917    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
2918    MAV_ODID_STATUS_UNDECLARED = 0,
2919    #[doc = "The UA is on the ground."]
2920    MAV_ODID_STATUS_GROUND = 1,
2921    #[doc = "The UA is in the air."]
2922    MAV_ODID_STATUS_AIRBORNE = 2,
2923    #[doc = "The UA is having an emergency."]
2924    MAV_ODID_STATUS_EMERGENCY = 3,
2925    #[doc = "The remote ID system is failing or unreliable in some way."]
2926    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
2927}
2928impl MavOdidStatus {
2929    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
2930}
2931impl Default for MavOdidStatus {
2932    fn default() -> Self {
2933        Self::DEFAULT
2934    }
2935}
2936#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2938#[cfg_attr(feature = "serde", serde(tag = "type"))]
2939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2940#[repr(u32)]
2941pub enum MavOdidTimeAcc {
2942    #[doc = "The timestamp accuracy is unknown."]
2943    MAV_ODID_TIME_ACC_UNKNOWN = 0,
2944    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
2945    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
2946    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
2947    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
2948    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
2949    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
2950    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
2951    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
2952    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
2953    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
2954    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
2955    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
2956    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
2957    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
2958    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
2959    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
2960    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
2961    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
2962    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
2963    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
2964    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
2965    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
2966    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
2967    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
2968    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
2969    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
2970    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
2971    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
2972    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
2973    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
2974}
2975impl MavOdidTimeAcc {
2976    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
2977}
2978impl Default for MavOdidTimeAcc {
2979    fn default() -> Self {
2980        Self::DEFAULT
2981    }
2982}
2983#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2984#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2985#[cfg_attr(feature = "serde", serde(tag = "type"))]
2986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2987#[repr(u32)]
2988pub enum MavOdidUaType {
2989    #[doc = "No UA (Unmanned Aircraft) type defined."]
2990    MAV_ODID_UA_TYPE_NONE = 0,
2991    #[doc = "Aeroplane/Airplane. Fixed wing."]
2992    MAV_ODID_UA_TYPE_AEROPLANE = 1,
2993    #[doc = "Helicopter or multirotor."]
2994    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
2995    #[doc = "Gyroplane."]
2996    MAV_ODID_UA_TYPE_GYROPLANE = 3,
2997    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
2998    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
2999    #[doc = "Ornithopter."]
3000    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3001    #[doc = "Glider."]
3002    MAV_ODID_UA_TYPE_GLIDER = 6,
3003    #[doc = "Kite."]
3004    MAV_ODID_UA_TYPE_KITE = 7,
3005    #[doc = "Free Balloon."]
3006    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3007    #[doc = "Captive Balloon."]
3008    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3009    #[doc = "Airship. E.g. a blimp."]
3010    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3011    #[doc = "Free Fall/Parachute (unpowered)."]
3012    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3013    #[doc = "Rocket."]
3014    MAV_ODID_UA_TYPE_ROCKET = 12,
3015    #[doc = "Tethered powered aircraft."]
3016    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3017    #[doc = "Ground Obstacle."]
3018    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3019    #[doc = "Other type of aircraft not listed earlier."]
3020    MAV_ODID_UA_TYPE_OTHER = 15,
3021}
3022impl MavOdidUaType {
3023    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3024}
3025impl Default for MavOdidUaType {
3026    fn default() -> Self {
3027        Self::DEFAULT
3028    }
3029}
3030#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3031#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3032#[cfg_attr(feature = "serde", serde(tag = "type"))]
3033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3034#[repr(u32)]
3035pub enum MavOdidVerAcc {
3036    #[doc = "The vertical accuracy is unknown."]
3037    MAV_ODID_VER_ACC_UNKNOWN = 0,
3038    #[doc = "The vertical accuracy is smaller than 150 meter."]
3039    MAV_ODID_VER_ACC_150_METER = 1,
3040    #[doc = "The vertical accuracy is smaller than 45 meter."]
3041    MAV_ODID_VER_ACC_45_METER = 2,
3042    #[doc = "The vertical accuracy is smaller than 25 meter."]
3043    MAV_ODID_VER_ACC_25_METER = 3,
3044    #[doc = "The vertical accuracy is smaller than 10 meter."]
3045    MAV_ODID_VER_ACC_10_METER = 4,
3046    #[doc = "The vertical accuracy is smaller than 3 meter."]
3047    MAV_ODID_VER_ACC_3_METER = 5,
3048    #[doc = "The vertical accuracy is smaller than 1 meter."]
3049    MAV_ODID_VER_ACC_1_METER = 6,
3050}
3051impl MavOdidVerAcc {
3052    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3053}
3054impl Default for MavOdidVerAcc {
3055    fn default() -> Self {
3056        Self::DEFAULT
3057    }
3058}
3059#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3060#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3061#[cfg_attr(feature = "serde", serde(tag = "type"))]
3062#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3063#[repr(u32)]
3064#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3065pub enum MavParamExtType {
3066    #[doc = "8-bit unsigned integer"]
3067    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3068    #[doc = "8-bit signed integer"]
3069    MAV_PARAM_EXT_TYPE_INT8 = 2,
3070    #[doc = "16-bit unsigned integer"]
3071    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3072    #[doc = "16-bit signed integer"]
3073    MAV_PARAM_EXT_TYPE_INT16 = 4,
3074    #[doc = "32-bit unsigned integer"]
3075    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3076    #[doc = "32-bit signed integer"]
3077    MAV_PARAM_EXT_TYPE_INT32 = 6,
3078    #[doc = "64-bit unsigned integer"]
3079    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3080    #[doc = "64-bit signed integer"]
3081    MAV_PARAM_EXT_TYPE_INT64 = 8,
3082    #[doc = "32-bit floating-point"]
3083    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3084    #[doc = "64-bit floating-point"]
3085    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3086    #[doc = "Custom Type"]
3087    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3088}
3089impl MavParamExtType {
3090    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3091}
3092impl Default for MavParamExtType {
3093    fn default() -> Self {
3094        Self::DEFAULT
3095    }
3096}
3097#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3099#[cfg_attr(feature = "serde", serde(tag = "type"))]
3100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3101#[repr(u32)]
3102#[doc = "Specifies the datatype of a MAVLink parameter."]
3103pub enum MavParamType {
3104    #[doc = "8-bit unsigned integer"]
3105    MAV_PARAM_TYPE_UINT8 = 1,
3106    #[doc = "8-bit signed integer"]
3107    MAV_PARAM_TYPE_INT8 = 2,
3108    #[doc = "16-bit unsigned integer"]
3109    MAV_PARAM_TYPE_UINT16 = 3,
3110    #[doc = "16-bit signed integer"]
3111    MAV_PARAM_TYPE_INT16 = 4,
3112    #[doc = "32-bit unsigned integer"]
3113    MAV_PARAM_TYPE_UINT32 = 5,
3114    #[doc = "32-bit signed integer"]
3115    MAV_PARAM_TYPE_INT32 = 6,
3116    #[doc = "64-bit unsigned integer"]
3117    MAV_PARAM_TYPE_UINT64 = 7,
3118    #[doc = "64-bit signed integer"]
3119    MAV_PARAM_TYPE_INT64 = 8,
3120    #[doc = "32-bit floating-point"]
3121    MAV_PARAM_TYPE_REAL32 = 9,
3122    #[doc = "64-bit floating-point"]
3123    MAV_PARAM_TYPE_REAL64 = 10,
3124}
3125impl MavParamType {
3126    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3127}
3128impl Default for MavParamType {
3129    fn default() -> Self {
3130        Self::DEFAULT
3131    }
3132}
3133bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3134impl MavPowerStatus {
3135    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3136}
3137impl Default for MavPowerStatus {
3138    fn default() -> Self {
3139        Self::DEFAULT
3140    }
3141}
3142bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3143impl MavProtocolCapability {
3144    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3145}
3146impl Default for MavProtocolCapability {
3147    fn default() -> Self {
3148        Self::DEFAULT
3149    }
3150}
3151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3153#[cfg_attr(feature = "serde", serde(tag = "type"))]
3154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3155#[repr(u32)]
3156#[doc = "Result from a MAVLink command (MAV_CMD)"]
3157pub enum MavResult {
3158    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3159    MAV_RESULT_ACCEPTED = 0,
3160    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3161    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3162    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3163    MAV_RESULT_DENIED = 2,
3164    #[doc = "Command is not supported (unknown)."]
3165    MAV_RESULT_UNSUPPORTED = 3,
3166    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3167    MAV_RESULT_FAILED = 4,
3168    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3169    MAV_RESULT_IN_PROGRESS = 5,
3170    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3171    MAV_RESULT_CANCELLED = 6,
3172    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3173    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3174    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3175    MAV_RESULT_COMMAND_INT_ONLY = 8,
3176    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3177    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3178}
3179impl MavResult {
3180    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3181}
3182impl Default for MavResult {
3183    fn default() -> Self {
3184        Self::DEFAULT
3185    }
3186}
3187#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3188#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3189#[cfg_attr(feature = "serde", serde(tag = "type"))]
3190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3191#[repr(u32)]
3192#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3193#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3194pub enum MavRoi {
3195    #[doc = "No region of interest."]
3196    MAV_ROI_NONE = 0,
3197    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3198    MAV_ROI_WPNEXT = 1,
3199    #[doc = "Point toward given waypoint."]
3200    MAV_ROI_WPINDEX = 2,
3201    #[doc = "Point toward fixed location."]
3202    MAV_ROI_LOCATION = 3,
3203    #[doc = "Point toward of given id."]
3204    MAV_ROI_TARGET = 4,
3205}
3206impl MavRoi {
3207    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3208}
3209impl Default for MavRoi {
3210    fn default() -> Self {
3211        Self::DEFAULT
3212    }
3213}
3214#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3215#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3216#[cfg_attr(feature = "serde", serde(tag = "type"))]
3217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3218#[repr(u32)]
3219#[doc = "Enumeration of sensor orientation, according to its rotations"]
3220pub enum MavSensorOrientation {
3221    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3222    MAV_SENSOR_ROTATION_NONE = 0,
3223    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3224    MAV_SENSOR_ROTATION_YAW_45 = 1,
3225    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3226    MAV_SENSOR_ROTATION_YAW_90 = 2,
3227    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3228    MAV_SENSOR_ROTATION_YAW_135 = 3,
3229    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3230    MAV_SENSOR_ROTATION_YAW_180 = 4,
3231    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3232    MAV_SENSOR_ROTATION_YAW_225 = 5,
3233    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3234    MAV_SENSOR_ROTATION_YAW_270 = 6,
3235    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3236    MAV_SENSOR_ROTATION_YAW_315 = 7,
3237    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3238    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3239    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3240    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3241    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3242    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3243    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3244    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3245    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3246    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3247    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3248    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3249    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3250    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3251    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3252    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3253    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3254    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3255    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3256    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3257    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3258    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3259    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3260    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3261    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3262    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3263    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3264    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3265    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3266    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3267    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3268    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3269    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3270    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3271    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3272    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3273    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3274    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3275    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3276    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3277    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3278    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3279    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3280    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3281    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3282    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3283    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3284    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3285    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3286    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3287    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3288    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3289    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3290    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3291    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3292    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3293    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3294    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3295    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3296    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3297    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3298    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3299    #[doc = "Pitch: 315"]
3300    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3301    #[doc = "Roll: 90, Pitch: 315"]
3302    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3303    #[doc = "Custom orientation"]
3304    MAV_SENSOR_ROTATION_CUSTOM = 100,
3305}
3306impl MavSensorOrientation {
3307    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3308}
3309impl Default for MavSensorOrientation {
3310    fn default() -> Self {
3311        Self::DEFAULT
3312    }
3313}
3314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3316#[cfg_attr(feature = "serde", serde(tag = "type"))]
3317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3318#[repr(u32)]
3319#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3320pub enum MavSeverity {
3321    #[doc = "System is unusable. This is a \"panic\" condition."]
3322    MAV_SEVERITY_EMERGENCY = 0,
3323    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3324    MAV_SEVERITY_ALERT = 1,
3325    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3326    MAV_SEVERITY_CRITICAL = 2,
3327    #[doc = "Indicates an error in secondary/redundant systems."]
3328    MAV_SEVERITY_ERROR = 3,
3329    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3330    MAV_SEVERITY_WARNING = 4,
3331    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3332    MAV_SEVERITY_NOTICE = 5,
3333    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3334    MAV_SEVERITY_INFO = 6,
3335    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3336    MAV_SEVERITY_DEBUG = 7,
3337}
3338impl MavSeverity {
3339    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3340}
3341impl Default for MavSeverity {
3342    fn default() -> Self {
3343        Self::DEFAULT
3344    }
3345}
3346#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3347#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3348#[cfg_attr(feature = "serde", serde(tag = "type"))]
3349#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3350#[repr(u32)]
3351#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3352pub enum MavStandardMode {
3353    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3354    MAV_STANDARD_MODE_NON_STANDARD = 0,
3355    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3356    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3357    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3358    MAV_STANDARD_MODE_ORBIT = 2,
3359    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3360    MAV_STANDARD_MODE_CRUISE = 3,
3361    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3362    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3363    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3364    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3365    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3366    MAV_STANDARD_MODE_MISSION = 6,
3367    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3368    MAV_STANDARD_MODE_LAND = 7,
3369    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3370    MAV_STANDARD_MODE_TAKEOFF = 8,
3371}
3372impl MavStandardMode {
3373    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3374}
3375impl Default for MavStandardMode {
3376    fn default() -> Self {
3377        Self::DEFAULT
3378    }
3379}
3380#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3382#[cfg_attr(feature = "serde", serde(tag = "type"))]
3383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3384#[repr(u32)]
3385pub enum MavState {
3386    #[doc = "Uninitialized system, state is unknown."]
3387    MAV_STATE_UNINIT = 0,
3388    #[doc = "System is booting up."]
3389    MAV_STATE_BOOT = 1,
3390    #[doc = "System is calibrating and not flight-ready."]
3391    MAV_STATE_CALIBRATING = 2,
3392    #[doc = "System is grounded and on standby. It can be launched any time."]
3393    MAV_STATE_STANDBY = 3,
3394    #[doc = "System is active and might be already airborne. Motors are engaged."]
3395    MAV_STATE_ACTIVE = 4,
3396    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3397    MAV_STATE_CRITICAL = 5,
3398    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3399    MAV_STATE_EMERGENCY = 6,
3400    #[doc = "System just initialized its power-down sequence, will shut down now."]
3401    MAV_STATE_POWEROFF = 7,
3402    #[doc = "System is terminating itself (failsafe or commanded)."]
3403    MAV_STATE_FLIGHT_TERMINATION = 8,
3404}
3405impl MavState {
3406    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3407}
3408impl Default for MavState {
3409    fn default() -> Self {
3410        Self::DEFAULT
3411    }
3412}
3413bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3414impl MavSysStatusSensor {
3415    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3416}
3417impl Default for MavSysStatusSensor {
3418    fn default() -> Self {
3419        Self::DEFAULT
3420    }
3421}
3422bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3423impl MavSysStatusSensorExtended {
3424    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3425}
3426impl Default for MavSysStatusSensorExtended {
3427    fn default() -> Self {
3428        Self::DEFAULT
3429    }
3430}
3431#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3432#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3433#[cfg_attr(feature = "serde", serde(tag = "type"))]
3434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3435#[repr(u32)]
3436pub enum MavTunnelPayloadType {
3437    #[doc = "Encoding of payload unknown."]
3438    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3439    #[doc = "Registered for STorM32 gimbal controller."]
3440    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3441    #[doc = "Registered for STorM32 gimbal controller."]
3442    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3443    #[doc = "Registered for STorM32 gimbal controller."]
3444    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3445    #[doc = "Registered for STorM32 gimbal controller."]
3446    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3447    #[doc = "Registered for STorM32 gimbal controller."]
3448    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3449    #[doc = "Registered for STorM32 gimbal controller."]
3450    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3451    #[doc = "Registered for STorM32 gimbal controller."]
3452    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3453    #[doc = "Registered for STorM32 gimbal controller."]
3454    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3455    #[doc = "Registered for STorM32 gimbal controller."]
3456    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3457    #[doc = "Registered for STorM32 gimbal controller."]
3458    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3459    #[doc = "Registered for ModalAI remote OSD protocol."]
3460    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3461    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3462    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3463    #[doc = "Registered for ModalAI vendor use."]
3464    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3465}
3466impl MavTunnelPayloadType {
3467    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3468}
3469impl Default for MavTunnelPayloadType {
3470    fn default() -> Self {
3471        Self::DEFAULT
3472    }
3473}
3474#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3475#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3476#[cfg_attr(feature = "serde", serde(tag = "type"))]
3477#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3478#[repr(u32)]
3479#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3480pub enum MavType {
3481    #[doc = "Generic micro air vehicle"]
3482    MAV_TYPE_GENERIC = 0,
3483    #[doc = "Fixed wing aircraft."]
3484    MAV_TYPE_FIXED_WING = 1,
3485    #[doc = "Quadrotor"]
3486    MAV_TYPE_QUADROTOR = 2,
3487    #[doc = "Coaxial helicopter"]
3488    MAV_TYPE_COAXIAL = 3,
3489    #[doc = "Normal helicopter with tail rotor."]
3490    MAV_TYPE_HELICOPTER = 4,
3491    #[doc = "Ground installation"]
3492    MAV_TYPE_ANTENNA_TRACKER = 5,
3493    #[doc = "Operator control unit / ground control station"]
3494    MAV_TYPE_GCS = 6,
3495    #[doc = "Airship, controlled"]
3496    MAV_TYPE_AIRSHIP = 7,
3497    #[doc = "Free balloon, uncontrolled"]
3498    MAV_TYPE_FREE_BALLOON = 8,
3499    #[doc = "Rocket"]
3500    MAV_TYPE_ROCKET = 9,
3501    #[doc = "Ground rover"]
3502    MAV_TYPE_GROUND_ROVER = 10,
3503    #[doc = "Surface vessel, boat, ship"]
3504    MAV_TYPE_SURFACE_BOAT = 11,
3505    #[doc = "Submarine"]
3506    MAV_TYPE_SUBMARINE = 12,
3507    #[doc = "Hexarotor"]
3508    MAV_TYPE_HEXAROTOR = 13,
3509    #[doc = "Octorotor"]
3510    MAV_TYPE_OCTOROTOR = 14,
3511    #[doc = "Tricopter"]
3512    MAV_TYPE_TRICOPTER = 15,
3513    #[doc = "Flapping wing"]
3514    MAV_TYPE_FLAPPING_WING = 16,
3515    #[doc = "Kite"]
3516    MAV_TYPE_KITE = 17,
3517    #[doc = "Onboard companion controller"]
3518    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3519    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3520    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3521    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3522    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3523    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3524    MAV_TYPE_VTOL_TILTROTOR = 21,
3525    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3526    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3527    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3528    MAV_TYPE_VTOL_TAILSITTER = 23,
3529    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3530    MAV_TYPE_VTOL_TILTWING = 24,
3531    #[doc = "VTOL reserved 5"]
3532    MAV_TYPE_VTOL_RESERVED5 = 25,
3533    #[doc = "Gimbal"]
3534    MAV_TYPE_GIMBAL = 26,
3535    #[doc = "ADSB system"]
3536    MAV_TYPE_ADSB = 27,
3537    #[doc = "Steerable, nonrigid airfoil"]
3538    MAV_TYPE_PARAFOIL = 28,
3539    #[doc = "Dodecarotor"]
3540    MAV_TYPE_DODECAROTOR = 29,
3541    #[doc = "Camera"]
3542    MAV_TYPE_CAMERA = 30,
3543    #[doc = "Charging station"]
3544    MAV_TYPE_CHARGING_STATION = 31,
3545    #[doc = "FLARM collision avoidance system"]
3546    MAV_TYPE_FLARM = 32,
3547    #[doc = "Servo"]
3548    MAV_TYPE_SERVO = 33,
3549    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3550    MAV_TYPE_ODID = 34,
3551    #[doc = "Decarotor"]
3552    MAV_TYPE_DECAROTOR = 35,
3553    #[doc = "Battery"]
3554    MAV_TYPE_BATTERY = 36,
3555    #[doc = "Parachute"]
3556    MAV_TYPE_PARACHUTE = 37,
3557    #[doc = "Log"]
3558    MAV_TYPE_LOG = 38,
3559    #[doc = "OSD"]
3560    MAV_TYPE_OSD = 39,
3561    #[doc = "IMU"]
3562    MAV_TYPE_IMU = 40,
3563    #[doc = "GPS"]
3564    MAV_TYPE_GPS = 41,
3565    #[doc = "Winch"]
3566    MAV_TYPE_WINCH = 42,
3567    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3568    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3569    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3570    MAV_TYPE_ILLUMINATOR = 44,
3571    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3572    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3573}
3574impl MavType {
3575    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3576}
3577impl Default for MavType {
3578    fn default() -> Self {
3579        Self::DEFAULT
3580    }
3581}
3582#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3584#[cfg_attr(feature = "serde", serde(tag = "type"))]
3585#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3586#[repr(u32)]
3587#[doc = "Enumeration of VTOL states"]
3588pub enum MavVtolState {
3589    #[doc = "MAV is not configured as VTOL"]
3590    MAV_VTOL_STATE_UNDEFINED = 0,
3591    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3592    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3593    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3594    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3595    #[doc = "VTOL is in multicopter state"]
3596    MAV_VTOL_STATE_MC = 3,
3597    #[doc = "VTOL is in fixed-wing state"]
3598    MAV_VTOL_STATE_FW = 4,
3599}
3600impl MavVtolState {
3601    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3602}
3603impl Default for MavVtolState {
3604    fn default() -> Self {
3605        Self::DEFAULT
3606    }
3607}
3608bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3609impl MavWinchStatusFlag {
3610    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3611}
3612impl Default for MavWinchStatusFlag {
3613    fn default() -> Self {
3614        Self::DEFAULT
3615    }
3616}
3617#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3618#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3619#[cfg_attr(feature = "serde", serde(tag = "type"))]
3620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3621#[repr(u32)]
3622pub enum MavlinkDataStreamType {
3623    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3624    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3625    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3626    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3627    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3628    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3629}
3630impl MavlinkDataStreamType {
3631    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3632}
3633impl Default for MavlinkDataStreamType {
3634    fn default() -> Self {
3635        Self::DEFAULT
3636    }
3637}
3638#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3639#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3640#[cfg_attr(feature = "serde", serde(tag = "type"))]
3641#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3642#[repr(u32)]
3643#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3644pub enum MissionState {
3645    #[doc = "The mission status reporting is not supported."]
3646    MISSION_STATE_UNKNOWN = 0,
3647    #[doc = "No mission on the vehicle."]
3648    MISSION_STATE_NO_MISSION = 1,
3649    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3650    MISSION_STATE_NOT_STARTED = 2,
3651    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3652    MISSION_STATE_ACTIVE = 3,
3653    #[doc = "Mission is paused when in auto mode."]
3654    MISSION_STATE_PAUSED = 4,
3655    #[doc = "Mission has executed all mission items."]
3656    MISSION_STATE_COMPLETE = 5,
3657}
3658impl MissionState {
3659    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3660}
3661impl Default for MissionState {
3662    fn default() -> Self {
3663        Self::DEFAULT
3664    }
3665}
3666#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3667#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3668#[cfg_attr(feature = "serde", serde(tag = "type"))]
3669#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3670#[repr(u32)]
3671#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3672pub enum MotorTestOrder {
3673    #[doc = "Default autopilot motor test method."]
3674    MOTOR_TEST_ORDER_DEFAULT = 0,
3675    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3676    MOTOR_TEST_ORDER_SEQUENCE = 1,
3677    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3678    MOTOR_TEST_ORDER_BOARD = 2,
3679}
3680impl MotorTestOrder {
3681    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3682}
3683impl Default for MotorTestOrder {
3684    fn default() -> Self {
3685        Self::DEFAULT
3686    }
3687}
3688#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3690#[cfg_attr(feature = "serde", serde(tag = "type"))]
3691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3692#[repr(u32)]
3693#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3694pub enum MotorTestThrottleType {
3695    #[doc = "Throttle as a percentage (0 ~ 100)"]
3696    MOTOR_TEST_THROTTLE_PERCENT = 0,
3697    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3698    MOTOR_TEST_THROTTLE_PWM = 1,
3699    #[doc = "Throttle pass-through from pilot's transmitter."]
3700    MOTOR_TEST_THROTTLE_PILOT = 2,
3701    #[doc = "Per-motor compass calibration test."]
3702    MOTOR_TEST_COMPASS_CAL = 3,
3703}
3704impl MotorTestThrottleType {
3705    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3706}
3707impl Default for MotorTestThrottleType {
3708    fn default() -> Self {
3709        Self::DEFAULT
3710    }
3711}
3712#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3714#[cfg_attr(feature = "serde", serde(tag = "type"))]
3715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3716#[repr(u32)]
3717pub enum NavVtolLandOptions {
3718    #[doc = "Default autopilot landing behaviour."]
3719    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3720    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3721    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3722    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3723    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3724}
3725impl NavVtolLandOptions {
3726    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3727}
3728impl Default for NavVtolLandOptions {
3729    fn default() -> Self {
3730        Self::DEFAULT
3731    }
3732}
3733#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3734#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3735#[cfg_attr(feature = "serde", serde(tag = "type"))]
3736#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3737#[repr(u32)]
3738#[doc = "Yaw behaviour during orbit flight."]
3739pub enum OrbitYawBehaviour {
3740    #[doc = "Vehicle front points to the center (default)."]
3741    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3742    #[doc = "Vehicle front holds heading when message received."]
3743    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3744    #[doc = "Yaw uncontrolled."]
3745    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3746    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3747    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3748    #[doc = "Yaw controlled by RC input."]
3749    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3750    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3751    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3752}
3753impl OrbitYawBehaviour {
3754    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3755}
3756impl Default for OrbitYawBehaviour {
3757    fn default() -> Self {
3758        Self::DEFAULT
3759    }
3760}
3761#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3762#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3763#[cfg_attr(feature = "serde", serde(tag = "type"))]
3764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3765#[repr(u32)]
3766#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3767pub enum ParachuteAction {
3768    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3769    PARACHUTE_DISABLE = 0,
3770    #[doc = "Enable auto-release of parachute."]
3771    PARACHUTE_ENABLE = 1,
3772    #[doc = "Release parachute and kill motors."]
3773    PARACHUTE_RELEASE = 2,
3774}
3775impl ParachuteAction {
3776    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3777}
3778impl Default for ParachuteAction {
3779    fn default() -> Self {
3780        Self::DEFAULT
3781    }
3782}
3783#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3785#[cfg_attr(feature = "serde", serde(tag = "type"))]
3786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3787#[repr(u32)]
3788#[doc = "Result from PARAM_EXT_SET message."]
3789pub enum ParamAck {
3790    #[doc = "Parameter value ACCEPTED and SET"]
3791    PARAM_ACK_ACCEPTED = 0,
3792    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3793    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3794    #[doc = "Parameter failed to set"]
3795    PARAM_ACK_FAILED = 2,
3796    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3797    PARAM_ACK_IN_PROGRESS = 3,
3798}
3799impl ParamAck {
3800    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3801}
3802impl Default for ParamAck {
3803    fn default() -> Self {
3804        Self::DEFAULT
3805    }
3806}
3807bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3808impl PositionTargetTypemask {
3809    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3810}
3811impl Default for PositionTargetTypemask {
3812    fn default() -> Self {
3813        Self::DEFAULT
3814    }
3815}
3816#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3818#[cfg_attr(feature = "serde", serde(tag = "type"))]
3819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3820#[repr(u32)]
3821#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3822pub enum PrecisionLandMode {
3823    #[doc = "Normal (non-precision) landing."]
3824    PRECISION_LAND_MODE_DISABLED = 0,
3825    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3826    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3827    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3828    PRECISION_LAND_MODE_REQUIRED = 2,
3829}
3830impl PrecisionLandMode {
3831    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3832}
3833impl Default for PrecisionLandMode {
3834    fn default() -> Self {
3835        Self::DEFAULT
3836    }
3837}
3838#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3839#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3840#[cfg_attr(feature = "serde", serde(tag = "type"))]
3841#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3842#[repr(u32)]
3843#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3844pub enum PreflightStorageMissionAction {
3845    #[doc = "Read current mission data from persistent storage"]
3846    MISSION_READ_PERSISTENT = 0,
3847    #[doc = "Write current mission data to persistent storage"]
3848    MISSION_WRITE_PERSISTENT = 1,
3849    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3850    MISSION_RESET_DEFAULT = 2,
3851}
3852impl PreflightStorageMissionAction {
3853    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3854}
3855impl Default for PreflightStorageMissionAction {
3856    fn default() -> Self {
3857        Self::DEFAULT
3858    }
3859}
3860#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3862#[cfg_attr(feature = "serde", serde(tag = "type"))]
3863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3864#[repr(u32)]
3865#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3866pub enum PreflightStorageParameterAction {
3867    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
3868    PARAM_READ_PERSISTENT = 0,
3869    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
3870    PARAM_WRITE_PERSISTENT = 1,
3871    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
3872    PARAM_RESET_CONFIG_DEFAULT = 2,
3873    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
3874    PARAM_RESET_SENSOR_DEFAULT = 3,
3875    #[doc = "Reset all parameters, including operation counters, to default values"]
3876    PARAM_RESET_ALL_DEFAULT = 4,
3877}
3878impl PreflightStorageParameterAction {
3879    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
3880}
3881impl Default for PreflightStorageParameterAction {
3882    fn default() -> Self {
3883        Self::DEFAULT
3884    }
3885}
3886#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3887#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3888#[cfg_attr(feature = "serde", serde(tag = "type"))]
3889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3890#[repr(u32)]
3891#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3892pub enum RcSubType {
3893    #[doc = "Spektrum DSM2"]
3894    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3895    #[doc = "Spektrum DSMX"]
3896    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3897    #[doc = "Spektrum DSMX8"]
3898    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3899}
3900impl RcSubType {
3901    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3902}
3903impl Default for RcSubType {
3904    fn default() -> Self {
3905        Self::DEFAULT
3906    }
3907}
3908#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3909#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3910#[cfg_attr(feature = "serde", serde(tag = "type"))]
3911#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3912#[repr(u32)]
3913#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
3914pub enum RcType {
3915    #[doc = "Spektrum"]
3916    RC_TYPE_SPEKTRUM = 0,
3917    #[doc = "CRSF"]
3918    RC_TYPE_CRSF = 1,
3919}
3920impl RcType {
3921    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
3922}
3923impl Default for RcType {
3924    fn default() -> Self {
3925        Self::DEFAULT
3926    }
3927}
3928#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3929#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3930#[cfg_attr(feature = "serde", serde(tag = "type"))]
3931#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3932#[repr(u32)]
3933#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
3934pub enum RebootShutdownConditions {
3935    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
3936    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
3937    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
3938    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
3939}
3940impl RebootShutdownConditions {
3941    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
3942}
3943impl Default for RebootShutdownConditions {
3944    fn default() -> Self {
3945        Self::DEFAULT
3946    }
3947}
3948#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3949#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3950#[cfg_attr(feature = "serde", serde(tag = "type"))]
3951#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3952#[repr(u32)]
3953#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3954pub enum RtkBaselineCoordinateSystem {
3955    #[doc = "Earth-centered, Earth-fixed"]
3956    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3957    #[doc = "RTK basestation centered, north, east, down"]
3958    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3959}
3960impl RtkBaselineCoordinateSystem {
3961    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3962}
3963impl Default for RtkBaselineCoordinateSystem {
3964    fn default() -> Self {
3965        Self::DEFAULT
3966    }
3967}
3968#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3969#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3970#[cfg_attr(feature = "serde", serde(tag = "type"))]
3971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3972#[repr(u32)]
3973#[doc = "Possible safety switch states."]
3974pub enum SafetySwitchState {
3975    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
3976    SAFETY_SWITCH_STATE_SAFE = 0,
3977    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
3978    SAFETY_SWITCH_STATE_DANGEROUS = 1,
3979}
3980impl SafetySwitchState {
3981    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
3982}
3983impl Default for SafetySwitchState {
3984    fn default() -> Self {
3985        Self::DEFAULT
3986    }
3987}
3988#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3989#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3990#[cfg_attr(feature = "serde", serde(tag = "type"))]
3991#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3992#[repr(u32)]
3993#[doc = "SERIAL_CONTROL device types"]
3994pub enum SerialControlDev {
3995    #[doc = "First telemetry port"]
3996    SERIAL_CONTROL_DEV_TELEM1 = 0,
3997    #[doc = "Second telemetry port"]
3998    SERIAL_CONTROL_DEV_TELEM2 = 1,
3999    #[doc = "First GPS port"]
4000    SERIAL_CONTROL_DEV_GPS1 = 2,
4001    #[doc = "Second GPS port"]
4002    SERIAL_CONTROL_DEV_GPS2 = 3,
4003    #[doc = "system shell"]
4004    SERIAL_CONTROL_DEV_SHELL = 10,
4005    #[doc = "SERIAL0"]
4006    SERIAL_CONTROL_SERIAL0 = 100,
4007    #[doc = "SERIAL1"]
4008    SERIAL_CONTROL_SERIAL1 = 101,
4009    #[doc = "SERIAL2"]
4010    SERIAL_CONTROL_SERIAL2 = 102,
4011    #[doc = "SERIAL3"]
4012    SERIAL_CONTROL_SERIAL3 = 103,
4013    #[doc = "SERIAL4"]
4014    SERIAL_CONTROL_SERIAL4 = 104,
4015    #[doc = "SERIAL5"]
4016    SERIAL_CONTROL_SERIAL5 = 105,
4017    #[doc = "SERIAL6"]
4018    SERIAL_CONTROL_SERIAL6 = 106,
4019    #[doc = "SERIAL7"]
4020    SERIAL_CONTROL_SERIAL7 = 107,
4021    #[doc = "SERIAL8"]
4022    SERIAL_CONTROL_SERIAL8 = 108,
4023    #[doc = "SERIAL9"]
4024    SERIAL_CONTROL_SERIAL9 = 109,
4025}
4026impl SerialControlDev {
4027    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4028}
4029impl Default for SerialControlDev {
4030    fn default() -> Self {
4031        Self::DEFAULT
4032    }
4033}
4034bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4035impl SerialControlFlag {
4036    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4037}
4038impl Default for SerialControlFlag {
4039    fn default() -> Self {
4040        Self::DEFAULT
4041    }
4042}
4043#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4045#[cfg_attr(feature = "serde", serde(tag = "type"))]
4046#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4047#[repr(u32)]
4048#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4049pub enum SetFocusType {
4050    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4051    FOCUS_TYPE_STEP = 0,
4052    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4053    FOCUS_TYPE_CONTINUOUS = 1,
4054    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4055    FOCUS_TYPE_RANGE = 2,
4056    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4057    FOCUS_TYPE_METERS = 3,
4058    #[doc = "Focus automatically."]
4059    FOCUS_TYPE_AUTO = 4,
4060    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4061    FOCUS_TYPE_AUTO_SINGLE = 5,
4062    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4063    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4064}
4065impl SetFocusType {
4066    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4067}
4068impl Default for SetFocusType {
4069    fn default() -> Self {
4070        Self::DEFAULT
4071    }
4072}
4073#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4074#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4075#[cfg_attr(feature = "serde", serde(tag = "type"))]
4076#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4077#[repr(u32)]
4078#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4079pub enum SpeedType {
4080    #[doc = "Airspeed"]
4081    SPEED_TYPE_AIRSPEED = 0,
4082    #[doc = "Groundspeed"]
4083    SPEED_TYPE_GROUNDSPEED = 1,
4084    #[doc = "Climb speed"]
4085    SPEED_TYPE_CLIMB_SPEED = 2,
4086    #[doc = "Descent speed"]
4087    SPEED_TYPE_DESCENT_SPEED = 3,
4088}
4089impl SpeedType {
4090    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4091}
4092impl Default for SpeedType {
4093    fn default() -> Self {
4094        Self::DEFAULT
4095    }
4096}
4097#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4099#[cfg_attr(feature = "serde", serde(tag = "type"))]
4100#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4101#[repr(u32)]
4102#[doc = "Flags to indicate the status of camera storage."]
4103pub enum StorageStatus {
4104    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4105    STORAGE_STATUS_EMPTY = 0,
4106    #[doc = "Storage present but unformatted."]
4107    STORAGE_STATUS_UNFORMATTED = 1,
4108    #[doc = "Storage present and ready."]
4109    STORAGE_STATUS_READY = 2,
4110    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4111    STORAGE_STATUS_NOT_SUPPORTED = 3,
4112}
4113impl StorageStatus {
4114    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4115}
4116impl Default for StorageStatus {
4117    fn default() -> Self {
4118        Self::DEFAULT
4119    }
4120}
4121#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4122#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4123#[cfg_attr(feature = "serde", serde(tag = "type"))]
4124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4125#[repr(u32)]
4126#[doc = "Flags to indicate the type of storage."]
4127pub enum StorageType {
4128    #[doc = "Storage type is not known."]
4129    STORAGE_TYPE_UNKNOWN = 0,
4130    #[doc = "Storage type is USB device."]
4131    STORAGE_TYPE_USB_STICK = 1,
4132    #[doc = "Storage type is SD card."]
4133    STORAGE_TYPE_SD = 2,
4134    #[doc = "Storage type is microSD card."]
4135    STORAGE_TYPE_MICROSD = 3,
4136    #[doc = "Storage type is CFast."]
4137    STORAGE_TYPE_CF = 4,
4138    #[doc = "Storage type is CFexpress."]
4139    STORAGE_TYPE_CFE = 5,
4140    #[doc = "Storage type is XQD."]
4141    STORAGE_TYPE_XQD = 6,
4142    #[doc = "Storage type is HD mass storage type."]
4143    STORAGE_TYPE_HD = 7,
4144    #[doc = "Storage type is other, not listed type."]
4145    STORAGE_TYPE_OTHER = 254,
4146}
4147impl StorageType {
4148    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4149}
4150impl Default for StorageType {
4151    fn default() -> Self {
4152        Self::DEFAULT
4153    }
4154}
4155bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4156impl StorageUsageFlag {
4157    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4158}
4159impl Default for StorageUsageFlag {
4160    fn default() -> Self {
4161        Self::DEFAULT
4162    }
4163}
4164#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4165#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4166#[cfg_attr(feature = "serde", serde(tag = "type"))]
4167#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4168#[repr(u32)]
4169#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4170pub enum TuneFormat {
4171    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4172    TUNE_FORMAT_QBASIC1_1 = 1,
4173    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4174    TUNE_FORMAT_MML_MODERN = 2,
4175}
4176impl TuneFormat {
4177    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4178}
4179impl Default for TuneFormat {
4180    fn default() -> Self {
4181        Self::DEFAULT
4182    }
4183}
4184#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4185#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4186#[cfg_attr(feature = "serde", serde(tag = "type"))]
4187#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4188#[repr(u32)]
4189#[doc = "Generalized UAVCAN node health"]
4190pub enum UavcanNodeHealth {
4191    #[doc = "The node is functioning properly."]
4192    UAVCAN_NODE_HEALTH_OK = 0,
4193    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4194    UAVCAN_NODE_HEALTH_WARNING = 1,
4195    #[doc = "The node has encountered a major failure."]
4196    UAVCAN_NODE_HEALTH_ERROR = 2,
4197    #[doc = "The node has suffered a fatal malfunction."]
4198    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4199}
4200impl UavcanNodeHealth {
4201    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4202}
4203impl Default for UavcanNodeHealth {
4204    fn default() -> Self {
4205        Self::DEFAULT
4206    }
4207}
4208#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4210#[cfg_attr(feature = "serde", serde(tag = "type"))]
4211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4212#[repr(u32)]
4213#[doc = "Generalized UAVCAN node mode"]
4214pub enum UavcanNodeMode {
4215    #[doc = "The node is performing its primary functions."]
4216    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4217    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4218    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4219    #[doc = "The node is under maintenance."]
4220    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4221    #[doc = "The node is in the process of updating its software."]
4222    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4223    #[doc = "The node is no longer available online."]
4224    UAVCAN_NODE_MODE_OFFLINE = 7,
4225}
4226impl UavcanNodeMode {
4227    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4228}
4229impl Default for UavcanNodeMode {
4230    fn default() -> Self {
4231        Self::DEFAULT
4232    }
4233}
4234bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4235impl UtmDataAvailFlags {
4236    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4237}
4238impl Default for UtmDataAvailFlags {
4239    fn default() -> Self {
4240        Self::DEFAULT
4241    }
4242}
4243#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4245#[cfg_attr(feature = "serde", serde(tag = "type"))]
4246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4247#[repr(u32)]
4248#[doc = "Airborne status of UAS."]
4249pub enum UtmFlightState {
4250    #[doc = "The flight state can't be determined."]
4251    UTM_FLIGHT_STATE_UNKNOWN = 1,
4252    #[doc = "UAS on ground."]
4253    UTM_FLIGHT_STATE_GROUND = 2,
4254    #[doc = "UAS airborne."]
4255    UTM_FLIGHT_STATE_AIRBORNE = 3,
4256    #[doc = "UAS is in an emergency flight state."]
4257    UTM_FLIGHT_STATE_EMERGENCY = 16,
4258    #[doc = "UAS has no active controls."]
4259    UTM_FLIGHT_STATE_NOCTRL = 32,
4260}
4261impl UtmFlightState {
4262    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4263}
4264impl Default for UtmFlightState {
4265    fn default() -> Self {
4266        Self::DEFAULT
4267    }
4268}
4269#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4270#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4271#[cfg_attr(feature = "serde", serde(tag = "type"))]
4272#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4273#[repr(u32)]
4274#[doc = "Video stream encodings"]
4275pub enum VideoStreamEncoding {
4276    #[doc = "Stream encoding is unknown"]
4277    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4278    #[doc = "Stream encoding is H.264"]
4279    VIDEO_STREAM_ENCODING_H264 = 1,
4280    #[doc = "Stream encoding is H.265"]
4281    VIDEO_STREAM_ENCODING_H265 = 2,
4282}
4283impl VideoStreamEncoding {
4284    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4285}
4286impl Default for VideoStreamEncoding {
4287    fn default() -> Self {
4288        Self::DEFAULT
4289    }
4290}
4291bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4292impl VideoStreamStatusFlags {
4293    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4294}
4295impl Default for VideoStreamStatusFlags {
4296    fn default() -> Self {
4297        Self::DEFAULT
4298    }
4299}
4300#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4302#[cfg_attr(feature = "serde", serde(tag = "type"))]
4303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4304#[repr(u32)]
4305#[doc = "Video stream types"]
4306pub enum VideoStreamType {
4307    #[doc = "Stream is RTSP"]
4308    VIDEO_STREAM_TYPE_RTSP = 0,
4309    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4310    VIDEO_STREAM_TYPE_RTPUDP = 1,
4311    #[doc = "Stream is MPEG on TCP"]
4312    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4313    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4314    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4315}
4316impl VideoStreamType {
4317    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4318}
4319impl Default for VideoStreamType {
4320    fn default() -> Self {
4321        Self::DEFAULT
4322    }
4323}
4324#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4325#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4326#[cfg_attr(feature = "serde", serde(tag = "type"))]
4327#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4328#[repr(u32)]
4329#[doc = "Direction of VTOL transition"]
4330pub enum VtolTransitionHeading {
4331    #[doc = "Respect the heading configuration of the vehicle."]
4332    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4333    #[doc = "Use the heading pointing towards the next waypoint."]
4334    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4335    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4336    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4337    #[doc = "Use the specified heading in parameter 4."]
4338    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4339    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4340    VTOL_TRANSITION_HEADING_ANY = 4,
4341}
4342impl VtolTransitionHeading {
4343    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4344}
4345impl Default for VtolTransitionHeading {
4346    fn default() -> Self {
4347        Self::DEFAULT
4348    }
4349}
4350#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4352#[cfg_attr(feature = "serde", serde(tag = "type"))]
4353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4354#[repr(u32)]
4355#[doc = "WiFi Mode."]
4356pub enum WifiConfigApMode {
4357    #[doc = "WiFi mode is undefined."]
4358    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4359    #[doc = "WiFi configured as an access point."]
4360    WIFI_CONFIG_AP_MODE_AP = 1,
4361    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4362    WIFI_CONFIG_AP_MODE_STATION = 2,
4363    #[doc = "WiFi disabled."]
4364    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4365}
4366impl WifiConfigApMode {
4367    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4368}
4369impl Default for WifiConfigApMode {
4370    fn default() -> Self {
4371        Self::DEFAULT
4372    }
4373}
4374#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4375#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4376#[cfg_attr(feature = "serde", serde(tag = "type"))]
4377#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4378#[repr(u32)]
4379#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4380pub enum WifiConfigApResponse {
4381    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4382    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4383    #[doc = "Changes accepted."]
4384    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4385    #[doc = "Changes rejected."]
4386    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4387    #[doc = "Invalid Mode."]
4388    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4389    #[doc = "Invalid SSID."]
4390    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4391    #[doc = "Invalid Password."]
4392    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4393}
4394impl WifiConfigApResponse {
4395    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4396}
4397impl Default for WifiConfigApResponse {
4398    fn default() -> Self {
4399        Self::DEFAULT
4400    }
4401}
4402#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4403#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4404#[cfg_attr(feature = "serde", serde(tag = "type"))]
4405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4406#[repr(u32)]
4407#[doc = "Winch actions."]
4408pub enum WinchActions {
4409    #[doc = "Allow motor to freewheel."]
4410    WINCH_RELAXED = 0,
4411    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4412    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4413    #[doc = "Wind or unwind line at specified rate."]
4414    WINCH_RATE_CONTROL = 2,
4415    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4416    WINCH_LOCK = 3,
4417    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4418    WINCH_DELIVER = 4,
4419    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4420    WINCH_HOLD = 5,
4421    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4422    WINCH_RETRACT = 6,
4423    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4424    WINCH_LOAD_LINE = 7,
4425    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4426    WINCH_ABANDON_LINE = 8,
4427    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4428    WINCH_LOAD_PAYLOAD = 9,
4429}
4430impl WinchActions {
4431    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4432}
4433impl Default for WinchActions {
4434    fn default() -> Self {
4435        Self::DEFAULT
4436    }
4437}
4438#[doc = "id: 140"]
4439#[doc = "Set the vehicle attitude and body angular rates."]
4440#[derive(Debug, Clone, PartialEq)]
4441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4443pub struct ACTUATOR_CONTROL_TARGET_DATA {
4444    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4445    pub time_usec: u64,
4446    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4447    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4448    pub controls: [f32; 8],
4449    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4450    pub group_mlx: u8,
4451}
4452impl ACTUATOR_CONTROL_TARGET_DATA {
4453    pub const ENCODED_LEN: usize = 41usize;
4454    pub const DEFAULT: Self = Self {
4455        time_usec: 0_u64,
4456        controls: [0.0_f32; 8usize],
4457        group_mlx: 0_u8,
4458    };
4459    #[cfg(feature = "arbitrary")]
4460    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4461        use arbitrary::{Arbitrary, Unstructured};
4462        let mut buf = [0u8; 1024];
4463        rng.fill_bytes(&mut buf);
4464        let mut unstructured = Unstructured::new(&buf);
4465        Self::arbitrary(&mut unstructured).unwrap_or_default()
4466    }
4467}
4468impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4469    fn default() -> Self {
4470        Self::DEFAULT.clone()
4471    }
4472}
4473impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4474    type Message = MavMessage;
4475    const ID: u32 = 140u32;
4476    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4477    const EXTRA_CRC: u8 = 181u8;
4478    const ENCODED_LEN: usize = 41usize;
4479    fn deser(
4480        _version: MavlinkVersion,
4481        __input: &[u8],
4482    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4483        let avail_len = __input.len();
4484        let mut payload_buf = [0; Self::ENCODED_LEN];
4485        let mut buf = if avail_len < Self::ENCODED_LEN {
4486            payload_buf[0..avail_len].copy_from_slice(__input);
4487            Bytes::new(&payload_buf)
4488        } else {
4489            Bytes::new(__input)
4490        };
4491        let mut __struct = Self::default();
4492        __struct.time_usec = buf.get_u64_le();
4493        for v in &mut __struct.controls {
4494            let val = buf.get_f32_le();
4495            *v = val;
4496        }
4497        __struct.group_mlx = buf.get_u8();
4498        Ok(__struct)
4499    }
4500    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4501        let mut __tmp = BytesMut::new(bytes);
4502        #[allow(clippy::absurd_extreme_comparisons)]
4503        #[allow(unused_comparisons)]
4504        if __tmp.remaining() < Self::ENCODED_LEN {
4505            panic!(
4506                "buffer is too small (need {} bytes, but got {})",
4507                Self::ENCODED_LEN,
4508                __tmp.remaining(),
4509            )
4510        }
4511        __tmp.put_u64_le(self.time_usec);
4512        for val in &self.controls {
4513            __tmp.put_f32_le(*val);
4514        }
4515        __tmp.put_u8(self.group_mlx);
4516        if matches!(version, MavlinkVersion::V2) {
4517            let len = __tmp.len();
4518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4519        } else {
4520            __tmp.len()
4521        }
4522    }
4523}
4524#[doc = "id: 375"]
4525#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4526#[derive(Debug, Clone, PartialEq)]
4527#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4528#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4529pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4530    #[doc = "Timestamp (since system boot)."]
4531    pub time_usec: u64,
4532    #[doc = "Active outputs"]
4533    pub active: u32,
4534    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4535    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4536    pub actuator: [f32; 32],
4537}
4538impl ACTUATOR_OUTPUT_STATUS_DATA {
4539    pub const ENCODED_LEN: usize = 140usize;
4540    pub const DEFAULT: Self = Self {
4541        time_usec: 0_u64,
4542        active: 0_u32,
4543        actuator: [0.0_f32; 32usize],
4544    };
4545    #[cfg(feature = "arbitrary")]
4546    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4547        use arbitrary::{Arbitrary, Unstructured};
4548        let mut buf = [0u8; 1024];
4549        rng.fill_bytes(&mut buf);
4550        let mut unstructured = Unstructured::new(&buf);
4551        Self::arbitrary(&mut unstructured).unwrap_or_default()
4552    }
4553}
4554impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4555    fn default() -> Self {
4556        Self::DEFAULT.clone()
4557    }
4558}
4559impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4560    type Message = MavMessage;
4561    const ID: u32 = 375u32;
4562    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4563    const EXTRA_CRC: u8 = 251u8;
4564    const ENCODED_LEN: usize = 140usize;
4565    fn deser(
4566        _version: MavlinkVersion,
4567        __input: &[u8],
4568    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4569        let avail_len = __input.len();
4570        let mut payload_buf = [0; Self::ENCODED_LEN];
4571        let mut buf = if avail_len < Self::ENCODED_LEN {
4572            payload_buf[0..avail_len].copy_from_slice(__input);
4573            Bytes::new(&payload_buf)
4574        } else {
4575            Bytes::new(__input)
4576        };
4577        let mut __struct = Self::default();
4578        __struct.time_usec = buf.get_u64_le();
4579        __struct.active = buf.get_u32_le();
4580        for v in &mut __struct.actuator {
4581            let val = buf.get_f32_le();
4582            *v = val;
4583        }
4584        Ok(__struct)
4585    }
4586    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4587        let mut __tmp = BytesMut::new(bytes);
4588        #[allow(clippy::absurd_extreme_comparisons)]
4589        #[allow(unused_comparisons)]
4590        if __tmp.remaining() < Self::ENCODED_LEN {
4591            panic!(
4592                "buffer is too small (need {} bytes, but got {})",
4593                Self::ENCODED_LEN,
4594                __tmp.remaining(),
4595            )
4596        }
4597        __tmp.put_u64_le(self.time_usec);
4598        __tmp.put_u32_le(self.active);
4599        for val in &self.actuator {
4600            __tmp.put_f32_le(*val);
4601        }
4602        if matches!(version, MavlinkVersion::V2) {
4603            let len = __tmp.len();
4604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4605        } else {
4606            __tmp.len()
4607        }
4608    }
4609}
4610#[doc = "id: 246"]
4611#[doc = "The location and information of an ADSB vehicle."]
4612#[derive(Debug, Clone, PartialEq)]
4613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4615pub struct ADSB_VEHICLE_DATA {
4616    #[doc = "ICAO address"]
4617    pub ICAO_address: u32,
4618    #[doc = "Latitude"]
4619    pub lat: i32,
4620    #[doc = "Longitude"]
4621    pub lon: i32,
4622    #[doc = "Altitude(ASL)"]
4623    pub altitude: i32,
4624    #[doc = "Course over ground"]
4625    pub heading: u16,
4626    #[doc = "The horizontal velocity"]
4627    pub hor_velocity: u16,
4628    #[doc = "The vertical velocity. Positive is up"]
4629    pub ver_velocity: i16,
4630    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4631    pub flags: AdsbFlags,
4632    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4633    pub squawk: u16,
4634    #[doc = "ADSB altitude type."]
4635    pub altitude_type: AdsbAltitudeType,
4636    #[doc = "The callsign, 8+null"]
4637    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4638    pub callsign: [u8; 9],
4639    #[doc = "ADSB emitter type."]
4640    pub emitter_type: AdsbEmitterType,
4641    #[doc = "Time since last communication in seconds"]
4642    pub tslc: u8,
4643}
4644impl ADSB_VEHICLE_DATA {
4645    pub const ENCODED_LEN: usize = 38usize;
4646    pub const DEFAULT: Self = Self {
4647        ICAO_address: 0_u32,
4648        lat: 0_i32,
4649        lon: 0_i32,
4650        altitude: 0_i32,
4651        heading: 0_u16,
4652        hor_velocity: 0_u16,
4653        ver_velocity: 0_i16,
4654        flags: AdsbFlags::DEFAULT,
4655        squawk: 0_u16,
4656        altitude_type: AdsbAltitudeType::DEFAULT,
4657        callsign: [0_u8; 9usize],
4658        emitter_type: AdsbEmitterType::DEFAULT,
4659        tslc: 0_u8,
4660    };
4661    #[cfg(feature = "arbitrary")]
4662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4663        use arbitrary::{Arbitrary, Unstructured};
4664        let mut buf = [0u8; 1024];
4665        rng.fill_bytes(&mut buf);
4666        let mut unstructured = Unstructured::new(&buf);
4667        Self::arbitrary(&mut unstructured).unwrap_or_default()
4668    }
4669}
4670impl Default for ADSB_VEHICLE_DATA {
4671    fn default() -> Self {
4672        Self::DEFAULT.clone()
4673    }
4674}
4675impl MessageData for ADSB_VEHICLE_DATA {
4676    type Message = MavMessage;
4677    const ID: u32 = 246u32;
4678    const NAME: &'static str = "ADSB_VEHICLE";
4679    const EXTRA_CRC: u8 = 184u8;
4680    const ENCODED_LEN: usize = 38usize;
4681    fn deser(
4682        _version: MavlinkVersion,
4683        __input: &[u8],
4684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4685        let avail_len = __input.len();
4686        let mut payload_buf = [0; Self::ENCODED_LEN];
4687        let mut buf = if avail_len < Self::ENCODED_LEN {
4688            payload_buf[0..avail_len].copy_from_slice(__input);
4689            Bytes::new(&payload_buf)
4690        } else {
4691            Bytes::new(__input)
4692        };
4693        let mut __struct = Self::default();
4694        __struct.ICAO_address = buf.get_u32_le();
4695        __struct.lat = buf.get_i32_le();
4696        __struct.lon = buf.get_i32_le();
4697        __struct.altitude = buf.get_i32_le();
4698        __struct.heading = buf.get_u16_le();
4699        __struct.hor_velocity = buf.get_u16_le();
4700        __struct.ver_velocity = buf.get_i16_le();
4701        let tmp = buf.get_u16_le();
4702        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4703            ::mavlink_core::error::ParserError::InvalidFlag {
4704                flag_type: "AdsbFlags",
4705                value: tmp as u32,
4706            },
4707        )?;
4708        __struct.squawk = buf.get_u16_le();
4709        let tmp = buf.get_u8();
4710        __struct.altitude_type =
4711            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4712                enum_type: "AdsbAltitudeType",
4713                value: tmp as u32,
4714            })?;
4715        for v in &mut __struct.callsign {
4716            let val = buf.get_u8();
4717            *v = val;
4718        }
4719        let tmp = buf.get_u8();
4720        __struct.emitter_type =
4721            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4722                enum_type: "AdsbEmitterType",
4723                value: tmp as u32,
4724            })?;
4725        __struct.tslc = buf.get_u8();
4726        Ok(__struct)
4727    }
4728    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4729        let mut __tmp = BytesMut::new(bytes);
4730        #[allow(clippy::absurd_extreme_comparisons)]
4731        #[allow(unused_comparisons)]
4732        if __tmp.remaining() < Self::ENCODED_LEN {
4733            panic!(
4734                "buffer is too small (need {} bytes, but got {})",
4735                Self::ENCODED_LEN,
4736                __tmp.remaining(),
4737            )
4738        }
4739        __tmp.put_u32_le(self.ICAO_address);
4740        __tmp.put_i32_le(self.lat);
4741        __tmp.put_i32_le(self.lon);
4742        __tmp.put_i32_le(self.altitude);
4743        __tmp.put_u16_le(self.heading);
4744        __tmp.put_u16_le(self.hor_velocity);
4745        __tmp.put_i16_le(self.ver_velocity);
4746        __tmp.put_u16_le(self.flags.bits());
4747        __tmp.put_u16_le(self.squawk);
4748        __tmp.put_u8(self.altitude_type as u8);
4749        for val in &self.callsign {
4750            __tmp.put_u8(*val);
4751        }
4752        __tmp.put_u8(self.emitter_type as u8);
4753        __tmp.put_u8(self.tslc);
4754        if matches!(version, MavlinkVersion::V2) {
4755            let len = __tmp.len();
4756            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4757        } else {
4758            __tmp.len()
4759        }
4760    }
4761}
4762#[doc = "id: 301"]
4763#[doc = "The location and information of an AIS vessel."]
4764#[derive(Debug, Clone, PartialEq)]
4765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4766#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4767pub struct AIS_VESSEL_DATA {
4768    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
4769    pub MMSI: u32,
4770    #[doc = "Latitude"]
4771    pub lat: i32,
4772    #[doc = "Longitude"]
4773    pub lon: i32,
4774    #[doc = "Course over ground"]
4775    pub COG: u16,
4776    #[doc = "True heading"]
4777    pub heading: u16,
4778    #[doc = "Speed over ground"]
4779    pub velocity: u16,
4780    #[doc = "Distance from lat/lon location to bow"]
4781    pub dimension_bow: u16,
4782    #[doc = "Distance from lat/lon location to stern"]
4783    pub dimension_stern: u16,
4784    #[doc = "Time since last communication in seconds"]
4785    pub tslc: u16,
4786    #[doc = "Bitmask to indicate various statuses including valid data fields"]
4787    pub flags: AisFlags,
4788    #[doc = "Turn rate"]
4789    pub turn_rate: i8,
4790    #[doc = "Navigational status"]
4791    pub navigational_status: AisNavStatus,
4792    #[doc = "Type of vessels"]
4793    pub mavtype: AisType,
4794    #[doc = "Distance from lat/lon location to port side"]
4795    pub dimension_port: u8,
4796    #[doc = "Distance from lat/lon location to starboard side"]
4797    pub dimension_starboard: u8,
4798    #[doc = "The vessel callsign"]
4799    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4800    pub callsign: [u8; 7],
4801    #[doc = "The vessel name"]
4802    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4803    pub name: [u8; 20],
4804}
4805impl AIS_VESSEL_DATA {
4806    pub const ENCODED_LEN: usize = 58usize;
4807    pub const DEFAULT: Self = Self {
4808        MMSI: 0_u32,
4809        lat: 0_i32,
4810        lon: 0_i32,
4811        COG: 0_u16,
4812        heading: 0_u16,
4813        velocity: 0_u16,
4814        dimension_bow: 0_u16,
4815        dimension_stern: 0_u16,
4816        tslc: 0_u16,
4817        flags: AisFlags::DEFAULT,
4818        turn_rate: 0_i8,
4819        navigational_status: AisNavStatus::DEFAULT,
4820        mavtype: AisType::DEFAULT,
4821        dimension_port: 0_u8,
4822        dimension_starboard: 0_u8,
4823        callsign: [0_u8; 7usize],
4824        name: [0_u8; 20usize],
4825    };
4826    #[cfg(feature = "arbitrary")]
4827    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4828        use arbitrary::{Arbitrary, Unstructured};
4829        let mut buf = [0u8; 1024];
4830        rng.fill_bytes(&mut buf);
4831        let mut unstructured = Unstructured::new(&buf);
4832        Self::arbitrary(&mut unstructured).unwrap_or_default()
4833    }
4834}
4835impl Default for AIS_VESSEL_DATA {
4836    fn default() -> Self {
4837        Self::DEFAULT.clone()
4838    }
4839}
4840impl MessageData for AIS_VESSEL_DATA {
4841    type Message = MavMessage;
4842    const ID: u32 = 301u32;
4843    const NAME: &'static str = "AIS_VESSEL";
4844    const EXTRA_CRC: u8 = 243u8;
4845    const ENCODED_LEN: usize = 58usize;
4846    fn deser(
4847        _version: MavlinkVersion,
4848        __input: &[u8],
4849    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4850        let avail_len = __input.len();
4851        let mut payload_buf = [0; Self::ENCODED_LEN];
4852        let mut buf = if avail_len < Self::ENCODED_LEN {
4853            payload_buf[0..avail_len].copy_from_slice(__input);
4854            Bytes::new(&payload_buf)
4855        } else {
4856            Bytes::new(__input)
4857        };
4858        let mut __struct = Self::default();
4859        __struct.MMSI = buf.get_u32_le();
4860        __struct.lat = buf.get_i32_le();
4861        __struct.lon = buf.get_i32_le();
4862        __struct.COG = buf.get_u16_le();
4863        __struct.heading = buf.get_u16_le();
4864        __struct.velocity = buf.get_u16_le();
4865        __struct.dimension_bow = buf.get_u16_le();
4866        __struct.dimension_stern = buf.get_u16_le();
4867        __struct.tslc = buf.get_u16_le();
4868        let tmp = buf.get_u16_le();
4869        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
4870            ::mavlink_core::error::ParserError::InvalidFlag {
4871                flag_type: "AisFlags",
4872                value: tmp as u32,
4873            },
4874        )?;
4875        __struct.turn_rate = buf.get_i8();
4876        let tmp = buf.get_u8();
4877        __struct.navigational_status =
4878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4879                enum_type: "AisNavStatus",
4880                value: tmp as u32,
4881            })?;
4882        let tmp = buf.get_u8();
4883        __struct.mavtype =
4884            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4885                enum_type: "AisType",
4886                value: tmp as u32,
4887            })?;
4888        __struct.dimension_port = buf.get_u8();
4889        __struct.dimension_starboard = buf.get_u8();
4890        for v in &mut __struct.callsign {
4891            let val = buf.get_u8();
4892            *v = val;
4893        }
4894        for v in &mut __struct.name {
4895            let val = buf.get_u8();
4896            *v = val;
4897        }
4898        Ok(__struct)
4899    }
4900    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4901        let mut __tmp = BytesMut::new(bytes);
4902        #[allow(clippy::absurd_extreme_comparisons)]
4903        #[allow(unused_comparisons)]
4904        if __tmp.remaining() < Self::ENCODED_LEN {
4905            panic!(
4906                "buffer is too small (need {} bytes, but got {})",
4907                Self::ENCODED_LEN,
4908                __tmp.remaining(),
4909            )
4910        }
4911        __tmp.put_u32_le(self.MMSI);
4912        __tmp.put_i32_le(self.lat);
4913        __tmp.put_i32_le(self.lon);
4914        __tmp.put_u16_le(self.COG);
4915        __tmp.put_u16_le(self.heading);
4916        __tmp.put_u16_le(self.velocity);
4917        __tmp.put_u16_le(self.dimension_bow);
4918        __tmp.put_u16_le(self.dimension_stern);
4919        __tmp.put_u16_le(self.tslc);
4920        __tmp.put_u16_le(self.flags.bits());
4921        __tmp.put_i8(self.turn_rate);
4922        __tmp.put_u8(self.navigational_status as u8);
4923        __tmp.put_u8(self.mavtype as u8);
4924        __tmp.put_u8(self.dimension_port);
4925        __tmp.put_u8(self.dimension_starboard);
4926        for val in &self.callsign {
4927            __tmp.put_u8(*val);
4928        }
4929        for val in &self.name {
4930            __tmp.put_u8(*val);
4931        }
4932        if matches!(version, MavlinkVersion::V2) {
4933            let len = __tmp.len();
4934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4935        } else {
4936            __tmp.len()
4937        }
4938    }
4939}
4940#[doc = "id: 141"]
4941#[doc = "The current system altitude."]
4942#[derive(Debug, Clone, PartialEq)]
4943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4945pub struct ALTITUDE_DATA {
4946    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4947    pub time_usec: u64,
4948    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
4949    pub altitude_monotonic: f32,
4950    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
4951    pub altitude_amsl: f32,
4952    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
4953    pub altitude_local: f32,
4954    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
4955    pub altitude_relative: f32,
4956    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
4957    pub altitude_terrain: f32,
4958    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
4959    pub bottom_clearance: f32,
4960}
4961impl ALTITUDE_DATA {
4962    pub const ENCODED_LEN: usize = 32usize;
4963    pub const DEFAULT: Self = Self {
4964        time_usec: 0_u64,
4965        altitude_monotonic: 0.0_f32,
4966        altitude_amsl: 0.0_f32,
4967        altitude_local: 0.0_f32,
4968        altitude_relative: 0.0_f32,
4969        altitude_terrain: 0.0_f32,
4970        bottom_clearance: 0.0_f32,
4971    };
4972    #[cfg(feature = "arbitrary")]
4973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4974        use arbitrary::{Arbitrary, Unstructured};
4975        let mut buf = [0u8; 1024];
4976        rng.fill_bytes(&mut buf);
4977        let mut unstructured = Unstructured::new(&buf);
4978        Self::arbitrary(&mut unstructured).unwrap_or_default()
4979    }
4980}
4981impl Default for ALTITUDE_DATA {
4982    fn default() -> Self {
4983        Self::DEFAULT.clone()
4984    }
4985}
4986impl MessageData for ALTITUDE_DATA {
4987    type Message = MavMessage;
4988    const ID: u32 = 141u32;
4989    const NAME: &'static str = "ALTITUDE";
4990    const EXTRA_CRC: u8 = 47u8;
4991    const ENCODED_LEN: usize = 32usize;
4992    fn deser(
4993        _version: MavlinkVersion,
4994        __input: &[u8],
4995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4996        let avail_len = __input.len();
4997        let mut payload_buf = [0; Self::ENCODED_LEN];
4998        let mut buf = if avail_len < Self::ENCODED_LEN {
4999            payload_buf[0..avail_len].copy_from_slice(__input);
5000            Bytes::new(&payload_buf)
5001        } else {
5002            Bytes::new(__input)
5003        };
5004        let mut __struct = Self::default();
5005        __struct.time_usec = buf.get_u64_le();
5006        __struct.altitude_monotonic = buf.get_f32_le();
5007        __struct.altitude_amsl = buf.get_f32_le();
5008        __struct.altitude_local = buf.get_f32_le();
5009        __struct.altitude_relative = buf.get_f32_le();
5010        __struct.altitude_terrain = buf.get_f32_le();
5011        __struct.bottom_clearance = buf.get_f32_le();
5012        Ok(__struct)
5013    }
5014    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5015        let mut __tmp = BytesMut::new(bytes);
5016        #[allow(clippy::absurd_extreme_comparisons)]
5017        #[allow(unused_comparisons)]
5018        if __tmp.remaining() < Self::ENCODED_LEN {
5019            panic!(
5020                "buffer is too small (need {} bytes, but got {})",
5021                Self::ENCODED_LEN,
5022                __tmp.remaining(),
5023            )
5024        }
5025        __tmp.put_u64_le(self.time_usec);
5026        __tmp.put_f32_le(self.altitude_monotonic);
5027        __tmp.put_f32_le(self.altitude_amsl);
5028        __tmp.put_f32_le(self.altitude_local);
5029        __tmp.put_f32_le(self.altitude_relative);
5030        __tmp.put_f32_le(self.altitude_terrain);
5031        __tmp.put_f32_le(self.bottom_clearance);
5032        if matches!(version, MavlinkVersion::V2) {
5033            let len = __tmp.len();
5034            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5035        } else {
5036            __tmp.len()
5037        }
5038    }
5039}
5040#[doc = "id: 30"]
5041#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5042#[derive(Debug, Clone, PartialEq)]
5043#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5045pub struct ATTITUDE_DATA {
5046    #[doc = "Timestamp (time since system boot)."]
5047    pub time_boot_ms: u32,
5048    #[doc = "Roll angle (-pi..+pi)"]
5049    pub roll: f32,
5050    #[doc = "Pitch angle (-pi..+pi)"]
5051    pub pitch: f32,
5052    #[doc = "Yaw angle (-pi..+pi)"]
5053    pub yaw: f32,
5054    #[doc = "Roll angular speed"]
5055    pub rollspeed: f32,
5056    #[doc = "Pitch angular speed"]
5057    pub pitchspeed: f32,
5058    #[doc = "Yaw angular speed"]
5059    pub yawspeed: f32,
5060}
5061impl ATTITUDE_DATA {
5062    pub const ENCODED_LEN: usize = 28usize;
5063    pub const DEFAULT: Self = Self {
5064        time_boot_ms: 0_u32,
5065        roll: 0.0_f32,
5066        pitch: 0.0_f32,
5067        yaw: 0.0_f32,
5068        rollspeed: 0.0_f32,
5069        pitchspeed: 0.0_f32,
5070        yawspeed: 0.0_f32,
5071    };
5072    #[cfg(feature = "arbitrary")]
5073    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5074        use arbitrary::{Arbitrary, Unstructured};
5075        let mut buf = [0u8; 1024];
5076        rng.fill_bytes(&mut buf);
5077        let mut unstructured = Unstructured::new(&buf);
5078        Self::arbitrary(&mut unstructured).unwrap_or_default()
5079    }
5080}
5081impl Default for ATTITUDE_DATA {
5082    fn default() -> Self {
5083        Self::DEFAULT.clone()
5084    }
5085}
5086impl MessageData for ATTITUDE_DATA {
5087    type Message = MavMessage;
5088    const ID: u32 = 30u32;
5089    const NAME: &'static str = "ATTITUDE";
5090    const EXTRA_CRC: u8 = 39u8;
5091    const ENCODED_LEN: usize = 28usize;
5092    fn deser(
5093        _version: MavlinkVersion,
5094        __input: &[u8],
5095    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5096        let avail_len = __input.len();
5097        let mut payload_buf = [0; Self::ENCODED_LEN];
5098        let mut buf = if avail_len < Self::ENCODED_LEN {
5099            payload_buf[0..avail_len].copy_from_slice(__input);
5100            Bytes::new(&payload_buf)
5101        } else {
5102            Bytes::new(__input)
5103        };
5104        let mut __struct = Self::default();
5105        __struct.time_boot_ms = buf.get_u32_le();
5106        __struct.roll = buf.get_f32_le();
5107        __struct.pitch = buf.get_f32_le();
5108        __struct.yaw = buf.get_f32_le();
5109        __struct.rollspeed = buf.get_f32_le();
5110        __struct.pitchspeed = buf.get_f32_le();
5111        __struct.yawspeed = buf.get_f32_le();
5112        Ok(__struct)
5113    }
5114    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5115        let mut __tmp = BytesMut::new(bytes);
5116        #[allow(clippy::absurd_extreme_comparisons)]
5117        #[allow(unused_comparisons)]
5118        if __tmp.remaining() < Self::ENCODED_LEN {
5119            panic!(
5120                "buffer is too small (need {} bytes, but got {})",
5121                Self::ENCODED_LEN,
5122                __tmp.remaining(),
5123            )
5124        }
5125        __tmp.put_u32_le(self.time_boot_ms);
5126        __tmp.put_f32_le(self.roll);
5127        __tmp.put_f32_le(self.pitch);
5128        __tmp.put_f32_le(self.yaw);
5129        __tmp.put_f32_le(self.rollspeed);
5130        __tmp.put_f32_le(self.pitchspeed);
5131        __tmp.put_f32_le(self.yawspeed);
5132        if matches!(version, MavlinkVersion::V2) {
5133            let len = __tmp.len();
5134            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5135        } else {
5136            __tmp.len()
5137        }
5138    }
5139}
5140#[doc = "id: 31"]
5141#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5142#[derive(Debug, Clone, PartialEq)]
5143#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5145pub struct ATTITUDE_QUATERNION_DATA {
5146    #[doc = "Timestamp (time since system boot)."]
5147    pub time_boot_ms: u32,
5148    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5149    pub q1: f32,
5150    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5151    pub q2: f32,
5152    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5153    pub q3: f32,
5154    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5155    pub q4: f32,
5156    #[doc = "Roll angular speed"]
5157    pub rollspeed: f32,
5158    #[doc = "Pitch angular speed"]
5159    pub pitchspeed: f32,
5160    #[doc = "Yaw angular speed"]
5161    pub yawspeed: f32,
5162    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5163    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5164    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5165    pub repr_offset_q: [f32; 4],
5166}
5167impl ATTITUDE_QUATERNION_DATA {
5168    pub const ENCODED_LEN: usize = 48usize;
5169    pub const DEFAULT: Self = Self {
5170        time_boot_ms: 0_u32,
5171        q1: 0.0_f32,
5172        q2: 0.0_f32,
5173        q3: 0.0_f32,
5174        q4: 0.0_f32,
5175        rollspeed: 0.0_f32,
5176        pitchspeed: 0.0_f32,
5177        yawspeed: 0.0_f32,
5178        repr_offset_q: [0.0_f32; 4usize],
5179    };
5180    #[cfg(feature = "arbitrary")]
5181    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5182        use arbitrary::{Arbitrary, Unstructured};
5183        let mut buf = [0u8; 1024];
5184        rng.fill_bytes(&mut buf);
5185        let mut unstructured = Unstructured::new(&buf);
5186        Self::arbitrary(&mut unstructured).unwrap_or_default()
5187    }
5188}
5189impl Default for ATTITUDE_QUATERNION_DATA {
5190    fn default() -> Self {
5191        Self::DEFAULT.clone()
5192    }
5193}
5194impl MessageData for ATTITUDE_QUATERNION_DATA {
5195    type Message = MavMessage;
5196    const ID: u32 = 31u32;
5197    const NAME: &'static str = "ATTITUDE_QUATERNION";
5198    const EXTRA_CRC: u8 = 246u8;
5199    const ENCODED_LEN: usize = 48usize;
5200    fn deser(
5201        _version: MavlinkVersion,
5202        __input: &[u8],
5203    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5204        let avail_len = __input.len();
5205        let mut payload_buf = [0; Self::ENCODED_LEN];
5206        let mut buf = if avail_len < Self::ENCODED_LEN {
5207            payload_buf[0..avail_len].copy_from_slice(__input);
5208            Bytes::new(&payload_buf)
5209        } else {
5210            Bytes::new(__input)
5211        };
5212        let mut __struct = Self::default();
5213        __struct.time_boot_ms = buf.get_u32_le();
5214        __struct.q1 = buf.get_f32_le();
5215        __struct.q2 = buf.get_f32_le();
5216        __struct.q3 = buf.get_f32_le();
5217        __struct.q4 = buf.get_f32_le();
5218        __struct.rollspeed = buf.get_f32_le();
5219        __struct.pitchspeed = buf.get_f32_le();
5220        __struct.yawspeed = buf.get_f32_le();
5221        for v in &mut __struct.repr_offset_q {
5222            let val = buf.get_f32_le();
5223            *v = val;
5224        }
5225        Ok(__struct)
5226    }
5227    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5228        let mut __tmp = BytesMut::new(bytes);
5229        #[allow(clippy::absurd_extreme_comparisons)]
5230        #[allow(unused_comparisons)]
5231        if __tmp.remaining() < Self::ENCODED_LEN {
5232            panic!(
5233                "buffer is too small (need {} bytes, but got {})",
5234                Self::ENCODED_LEN,
5235                __tmp.remaining(),
5236            )
5237        }
5238        __tmp.put_u32_le(self.time_boot_ms);
5239        __tmp.put_f32_le(self.q1);
5240        __tmp.put_f32_le(self.q2);
5241        __tmp.put_f32_le(self.q3);
5242        __tmp.put_f32_le(self.q4);
5243        __tmp.put_f32_le(self.rollspeed);
5244        __tmp.put_f32_le(self.pitchspeed);
5245        __tmp.put_f32_le(self.yawspeed);
5246        for val in &self.repr_offset_q {
5247            __tmp.put_f32_le(*val);
5248        }
5249        if matches!(version, MavlinkVersion::V2) {
5250            let len = __tmp.len();
5251            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5252        } else {
5253            __tmp.len()
5254        }
5255    }
5256}
5257#[doc = "id: 61"]
5258#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5259#[derive(Debug, Clone, PartialEq)]
5260#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5261#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5262pub struct ATTITUDE_QUATERNION_COV_DATA {
5263    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5264    pub time_usec: u64,
5265    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5266    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5267    pub q: [f32; 4],
5268    #[doc = "Roll angular speed"]
5269    pub rollspeed: f32,
5270    #[doc = "Pitch angular speed"]
5271    pub pitchspeed: f32,
5272    #[doc = "Yaw angular speed"]
5273    pub yawspeed: f32,
5274    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5275    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5276    pub covariance: [f32; 9],
5277}
5278impl ATTITUDE_QUATERNION_COV_DATA {
5279    pub const ENCODED_LEN: usize = 72usize;
5280    pub const DEFAULT: Self = Self {
5281        time_usec: 0_u64,
5282        q: [0.0_f32; 4usize],
5283        rollspeed: 0.0_f32,
5284        pitchspeed: 0.0_f32,
5285        yawspeed: 0.0_f32,
5286        covariance: [0.0_f32; 9usize],
5287    };
5288    #[cfg(feature = "arbitrary")]
5289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5290        use arbitrary::{Arbitrary, Unstructured};
5291        let mut buf = [0u8; 1024];
5292        rng.fill_bytes(&mut buf);
5293        let mut unstructured = Unstructured::new(&buf);
5294        Self::arbitrary(&mut unstructured).unwrap_or_default()
5295    }
5296}
5297impl Default for ATTITUDE_QUATERNION_COV_DATA {
5298    fn default() -> Self {
5299        Self::DEFAULT.clone()
5300    }
5301}
5302impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5303    type Message = MavMessage;
5304    const ID: u32 = 61u32;
5305    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5306    const EXTRA_CRC: u8 = 167u8;
5307    const ENCODED_LEN: usize = 72usize;
5308    fn deser(
5309        _version: MavlinkVersion,
5310        __input: &[u8],
5311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5312        let avail_len = __input.len();
5313        let mut payload_buf = [0; Self::ENCODED_LEN];
5314        let mut buf = if avail_len < Self::ENCODED_LEN {
5315            payload_buf[0..avail_len].copy_from_slice(__input);
5316            Bytes::new(&payload_buf)
5317        } else {
5318            Bytes::new(__input)
5319        };
5320        let mut __struct = Self::default();
5321        __struct.time_usec = buf.get_u64_le();
5322        for v in &mut __struct.q {
5323            let val = buf.get_f32_le();
5324            *v = val;
5325        }
5326        __struct.rollspeed = buf.get_f32_le();
5327        __struct.pitchspeed = buf.get_f32_le();
5328        __struct.yawspeed = buf.get_f32_le();
5329        for v in &mut __struct.covariance {
5330            let val = buf.get_f32_le();
5331            *v = val;
5332        }
5333        Ok(__struct)
5334    }
5335    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5336        let mut __tmp = BytesMut::new(bytes);
5337        #[allow(clippy::absurd_extreme_comparisons)]
5338        #[allow(unused_comparisons)]
5339        if __tmp.remaining() < Self::ENCODED_LEN {
5340            panic!(
5341                "buffer is too small (need {} bytes, but got {})",
5342                Self::ENCODED_LEN,
5343                __tmp.remaining(),
5344            )
5345        }
5346        __tmp.put_u64_le(self.time_usec);
5347        for val in &self.q {
5348            __tmp.put_f32_le(*val);
5349        }
5350        __tmp.put_f32_le(self.rollspeed);
5351        __tmp.put_f32_le(self.pitchspeed);
5352        __tmp.put_f32_le(self.yawspeed);
5353        for val in &self.covariance {
5354            __tmp.put_f32_le(*val);
5355        }
5356        if matches!(version, MavlinkVersion::V2) {
5357            let len = __tmp.len();
5358            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5359        } else {
5360            __tmp.len()
5361        }
5362    }
5363}
5364#[doc = "id: 83"]
5365#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5366#[derive(Debug, Clone, PartialEq)]
5367#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5368#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5369pub struct ATTITUDE_TARGET_DATA {
5370    #[doc = "Timestamp (time since system boot)."]
5371    pub time_boot_ms: u32,
5372    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5373    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5374    pub q: [f32; 4],
5375    #[doc = "Body roll rate"]
5376    pub body_roll_rate: f32,
5377    #[doc = "Body pitch rate"]
5378    pub body_pitch_rate: f32,
5379    #[doc = "Body yaw rate"]
5380    pub body_yaw_rate: f32,
5381    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5382    pub thrust: f32,
5383    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5384    pub type_mask: AttitudeTargetTypemask,
5385}
5386impl ATTITUDE_TARGET_DATA {
5387    pub const ENCODED_LEN: usize = 37usize;
5388    pub const DEFAULT: Self = Self {
5389        time_boot_ms: 0_u32,
5390        q: [0.0_f32; 4usize],
5391        body_roll_rate: 0.0_f32,
5392        body_pitch_rate: 0.0_f32,
5393        body_yaw_rate: 0.0_f32,
5394        thrust: 0.0_f32,
5395        type_mask: AttitudeTargetTypemask::DEFAULT,
5396    };
5397    #[cfg(feature = "arbitrary")]
5398    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5399        use arbitrary::{Arbitrary, Unstructured};
5400        let mut buf = [0u8; 1024];
5401        rng.fill_bytes(&mut buf);
5402        let mut unstructured = Unstructured::new(&buf);
5403        Self::arbitrary(&mut unstructured).unwrap_or_default()
5404    }
5405}
5406impl Default for ATTITUDE_TARGET_DATA {
5407    fn default() -> Self {
5408        Self::DEFAULT.clone()
5409    }
5410}
5411impl MessageData for ATTITUDE_TARGET_DATA {
5412    type Message = MavMessage;
5413    const ID: u32 = 83u32;
5414    const NAME: &'static str = "ATTITUDE_TARGET";
5415    const EXTRA_CRC: u8 = 22u8;
5416    const ENCODED_LEN: usize = 37usize;
5417    fn deser(
5418        _version: MavlinkVersion,
5419        __input: &[u8],
5420    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5421        let avail_len = __input.len();
5422        let mut payload_buf = [0; Self::ENCODED_LEN];
5423        let mut buf = if avail_len < Self::ENCODED_LEN {
5424            payload_buf[0..avail_len].copy_from_slice(__input);
5425            Bytes::new(&payload_buf)
5426        } else {
5427            Bytes::new(__input)
5428        };
5429        let mut __struct = Self::default();
5430        __struct.time_boot_ms = buf.get_u32_le();
5431        for v in &mut __struct.q {
5432            let val = buf.get_f32_le();
5433            *v = val;
5434        }
5435        __struct.body_roll_rate = buf.get_f32_le();
5436        __struct.body_pitch_rate = buf.get_f32_le();
5437        __struct.body_yaw_rate = buf.get_f32_le();
5438        __struct.thrust = buf.get_f32_le();
5439        let tmp = buf.get_u8();
5440        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5441            tmp & AttitudeTargetTypemask::all().bits(),
5442        )
5443        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5444            flag_type: "AttitudeTargetTypemask",
5445            value: tmp as u32,
5446        })?;
5447        Ok(__struct)
5448    }
5449    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5450        let mut __tmp = BytesMut::new(bytes);
5451        #[allow(clippy::absurd_extreme_comparisons)]
5452        #[allow(unused_comparisons)]
5453        if __tmp.remaining() < Self::ENCODED_LEN {
5454            panic!(
5455                "buffer is too small (need {} bytes, but got {})",
5456                Self::ENCODED_LEN,
5457                __tmp.remaining(),
5458            )
5459        }
5460        __tmp.put_u32_le(self.time_boot_ms);
5461        for val in &self.q {
5462            __tmp.put_f32_le(*val);
5463        }
5464        __tmp.put_f32_le(self.body_roll_rate);
5465        __tmp.put_f32_le(self.body_pitch_rate);
5466        __tmp.put_f32_le(self.body_yaw_rate);
5467        __tmp.put_f32_le(self.thrust);
5468        __tmp.put_u8(self.type_mask.bits());
5469        if matches!(version, MavlinkVersion::V2) {
5470            let len = __tmp.len();
5471            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5472        } else {
5473            __tmp.len()
5474        }
5475    }
5476}
5477#[doc = "id: 138"]
5478#[doc = "Motion capture attitude and position."]
5479#[derive(Debug, Clone, PartialEq)]
5480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5482pub struct ATT_POS_MOCAP_DATA {
5483    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5484    pub time_usec: u64,
5485    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5486    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5487    pub q: [f32; 4],
5488    #[doc = "X position (NED)"]
5489    pub x: f32,
5490    #[doc = "Y position (NED)"]
5491    pub y: f32,
5492    #[doc = "Z position (NED)"]
5493    pub z: f32,
5494    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5495    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5496    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5497    pub covariance: [f32; 21],
5498}
5499impl ATT_POS_MOCAP_DATA {
5500    pub const ENCODED_LEN: usize = 120usize;
5501    pub const DEFAULT: Self = Self {
5502        time_usec: 0_u64,
5503        q: [0.0_f32; 4usize],
5504        x: 0.0_f32,
5505        y: 0.0_f32,
5506        z: 0.0_f32,
5507        covariance: [0.0_f32; 21usize],
5508    };
5509    #[cfg(feature = "arbitrary")]
5510    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5511        use arbitrary::{Arbitrary, Unstructured};
5512        let mut buf = [0u8; 1024];
5513        rng.fill_bytes(&mut buf);
5514        let mut unstructured = Unstructured::new(&buf);
5515        Self::arbitrary(&mut unstructured).unwrap_or_default()
5516    }
5517}
5518impl Default for ATT_POS_MOCAP_DATA {
5519    fn default() -> Self {
5520        Self::DEFAULT.clone()
5521    }
5522}
5523impl MessageData for ATT_POS_MOCAP_DATA {
5524    type Message = MavMessage;
5525    const ID: u32 = 138u32;
5526    const NAME: &'static str = "ATT_POS_MOCAP";
5527    const EXTRA_CRC: u8 = 109u8;
5528    const ENCODED_LEN: usize = 120usize;
5529    fn deser(
5530        _version: MavlinkVersion,
5531        __input: &[u8],
5532    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5533        let avail_len = __input.len();
5534        let mut payload_buf = [0; Self::ENCODED_LEN];
5535        let mut buf = if avail_len < Self::ENCODED_LEN {
5536            payload_buf[0..avail_len].copy_from_slice(__input);
5537            Bytes::new(&payload_buf)
5538        } else {
5539            Bytes::new(__input)
5540        };
5541        let mut __struct = Self::default();
5542        __struct.time_usec = buf.get_u64_le();
5543        for v in &mut __struct.q {
5544            let val = buf.get_f32_le();
5545            *v = val;
5546        }
5547        __struct.x = buf.get_f32_le();
5548        __struct.y = buf.get_f32_le();
5549        __struct.z = buf.get_f32_le();
5550        for v in &mut __struct.covariance {
5551            let val = buf.get_f32_le();
5552            *v = val;
5553        }
5554        Ok(__struct)
5555    }
5556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5557        let mut __tmp = BytesMut::new(bytes);
5558        #[allow(clippy::absurd_extreme_comparisons)]
5559        #[allow(unused_comparisons)]
5560        if __tmp.remaining() < Self::ENCODED_LEN {
5561            panic!(
5562                "buffer is too small (need {} bytes, but got {})",
5563                Self::ENCODED_LEN,
5564                __tmp.remaining(),
5565            )
5566        }
5567        __tmp.put_u64_le(self.time_usec);
5568        for val in &self.q {
5569            __tmp.put_f32_le(*val);
5570        }
5571        __tmp.put_f32_le(self.x);
5572        __tmp.put_f32_le(self.y);
5573        __tmp.put_f32_le(self.z);
5574        for val in &self.covariance {
5575            __tmp.put_f32_le(*val);
5576        }
5577        if matches!(version, MavlinkVersion::V2) {
5578            let len = __tmp.len();
5579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5580        } else {
5581            __tmp.len()
5582        }
5583    }
5584}
5585#[doc = "id: 7"]
5586#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5587#[derive(Debug, Clone, PartialEq)]
5588#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5589#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5590pub struct AUTH_KEY_DATA {
5591    #[doc = "key"]
5592    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5593    pub key: [u8; 32],
5594}
5595impl AUTH_KEY_DATA {
5596    pub const ENCODED_LEN: usize = 32usize;
5597    pub const DEFAULT: Self = Self {
5598        key: [0_u8; 32usize],
5599    };
5600    #[cfg(feature = "arbitrary")]
5601    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5602        use arbitrary::{Arbitrary, Unstructured};
5603        let mut buf = [0u8; 1024];
5604        rng.fill_bytes(&mut buf);
5605        let mut unstructured = Unstructured::new(&buf);
5606        Self::arbitrary(&mut unstructured).unwrap_or_default()
5607    }
5608}
5609impl Default for AUTH_KEY_DATA {
5610    fn default() -> Self {
5611        Self::DEFAULT.clone()
5612    }
5613}
5614impl MessageData for AUTH_KEY_DATA {
5615    type Message = MavMessage;
5616    const ID: u32 = 7u32;
5617    const NAME: &'static str = "AUTH_KEY";
5618    const EXTRA_CRC: u8 = 119u8;
5619    const ENCODED_LEN: usize = 32usize;
5620    fn deser(
5621        _version: MavlinkVersion,
5622        __input: &[u8],
5623    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5624        let avail_len = __input.len();
5625        let mut payload_buf = [0; Self::ENCODED_LEN];
5626        let mut buf = if avail_len < Self::ENCODED_LEN {
5627            payload_buf[0..avail_len].copy_from_slice(__input);
5628            Bytes::new(&payload_buf)
5629        } else {
5630            Bytes::new(__input)
5631        };
5632        let mut __struct = Self::default();
5633        for v in &mut __struct.key {
5634            let val = buf.get_u8();
5635            *v = val;
5636        }
5637        Ok(__struct)
5638    }
5639    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5640        let mut __tmp = BytesMut::new(bytes);
5641        #[allow(clippy::absurd_extreme_comparisons)]
5642        #[allow(unused_comparisons)]
5643        if __tmp.remaining() < Self::ENCODED_LEN {
5644            panic!(
5645                "buffer is too small (need {} bytes, but got {})",
5646                Self::ENCODED_LEN,
5647                __tmp.remaining(),
5648            )
5649        }
5650        for val in &self.key {
5651            __tmp.put_u8(*val);
5652        }
5653        if matches!(version, MavlinkVersion::V2) {
5654            let len = __tmp.len();
5655            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5656        } else {
5657            __tmp.len()
5658        }
5659    }
5660}
5661#[doc = "id: 286"]
5662#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5663#[derive(Debug, Clone, PartialEq)]
5664#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5665#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5666pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5667    #[doc = "Timestamp (time since system boot)."]
5668    pub time_boot_us: u64,
5669    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5670    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5671    pub q: [f32; 4],
5672    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5673    pub q_estimated_delay_us: u32,
5674    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5675    pub vx: f32,
5676    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5677    pub vy: f32,
5678    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5679    pub vz: f32,
5680    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5681    pub v_estimated_delay_us: u32,
5682    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5683    pub feed_forward_angular_velocity_z: f32,
5684    #[doc = "Bitmap indicating which estimator outputs are valid."]
5685    pub estimator_status: EstimatorStatusFlags,
5686    #[doc = "System ID"]
5687    pub target_system: u8,
5688    #[doc = "Component ID"]
5689    pub target_component: u8,
5690    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5691    pub landed_state: MavLandedState,
5692    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5693    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5694    pub angular_velocity_z: f32,
5695}
5696impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5697    pub const ENCODED_LEN: usize = 57usize;
5698    pub const DEFAULT: Self = Self {
5699        time_boot_us: 0_u64,
5700        q: [0.0_f32; 4usize],
5701        q_estimated_delay_us: 0_u32,
5702        vx: 0.0_f32,
5703        vy: 0.0_f32,
5704        vz: 0.0_f32,
5705        v_estimated_delay_us: 0_u32,
5706        feed_forward_angular_velocity_z: 0.0_f32,
5707        estimator_status: EstimatorStatusFlags::DEFAULT,
5708        target_system: 0_u8,
5709        target_component: 0_u8,
5710        landed_state: MavLandedState::DEFAULT,
5711        angular_velocity_z: 0.0_f32,
5712    };
5713    #[cfg(feature = "arbitrary")]
5714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5715        use arbitrary::{Arbitrary, Unstructured};
5716        let mut buf = [0u8; 1024];
5717        rng.fill_bytes(&mut buf);
5718        let mut unstructured = Unstructured::new(&buf);
5719        Self::arbitrary(&mut unstructured).unwrap_or_default()
5720    }
5721}
5722impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5723    fn default() -> Self {
5724        Self::DEFAULT.clone()
5725    }
5726}
5727impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5728    type Message = MavMessage;
5729    const ID: u32 = 286u32;
5730    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
5731    const EXTRA_CRC: u8 = 210u8;
5732    const ENCODED_LEN: usize = 57usize;
5733    fn deser(
5734        _version: MavlinkVersion,
5735        __input: &[u8],
5736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5737        let avail_len = __input.len();
5738        let mut payload_buf = [0; Self::ENCODED_LEN];
5739        let mut buf = if avail_len < Self::ENCODED_LEN {
5740            payload_buf[0..avail_len].copy_from_slice(__input);
5741            Bytes::new(&payload_buf)
5742        } else {
5743            Bytes::new(__input)
5744        };
5745        let mut __struct = Self::default();
5746        __struct.time_boot_us = buf.get_u64_le();
5747        for v in &mut __struct.q {
5748            let val = buf.get_f32_le();
5749            *v = val;
5750        }
5751        __struct.q_estimated_delay_us = buf.get_u32_le();
5752        __struct.vx = buf.get_f32_le();
5753        __struct.vy = buf.get_f32_le();
5754        __struct.vz = buf.get_f32_le();
5755        __struct.v_estimated_delay_us = buf.get_u32_le();
5756        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
5757        let tmp = buf.get_u16_le();
5758        __struct.estimator_status = EstimatorStatusFlags::from_bits(
5759            tmp & EstimatorStatusFlags::all().bits(),
5760        )
5761        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5762            flag_type: "EstimatorStatusFlags",
5763            value: tmp as u32,
5764        })?;
5765        __struct.target_system = buf.get_u8();
5766        __struct.target_component = buf.get_u8();
5767        let tmp = buf.get_u8();
5768        __struct.landed_state =
5769            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5770                enum_type: "MavLandedState",
5771                value: tmp as u32,
5772            })?;
5773        __struct.angular_velocity_z = buf.get_f32_le();
5774        Ok(__struct)
5775    }
5776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5777        let mut __tmp = BytesMut::new(bytes);
5778        #[allow(clippy::absurd_extreme_comparisons)]
5779        #[allow(unused_comparisons)]
5780        if __tmp.remaining() < Self::ENCODED_LEN {
5781            panic!(
5782                "buffer is too small (need {} bytes, but got {})",
5783                Self::ENCODED_LEN,
5784                __tmp.remaining(),
5785            )
5786        }
5787        __tmp.put_u64_le(self.time_boot_us);
5788        for val in &self.q {
5789            __tmp.put_f32_le(*val);
5790        }
5791        __tmp.put_u32_le(self.q_estimated_delay_us);
5792        __tmp.put_f32_le(self.vx);
5793        __tmp.put_f32_le(self.vy);
5794        __tmp.put_f32_le(self.vz);
5795        __tmp.put_u32_le(self.v_estimated_delay_us);
5796        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
5797        __tmp.put_u16_le(self.estimator_status.bits());
5798        __tmp.put_u8(self.target_system);
5799        __tmp.put_u8(self.target_component);
5800        __tmp.put_u8(self.landed_state as u8);
5801        __tmp.put_f32_le(self.angular_velocity_z);
5802        if matches!(version, MavlinkVersion::V2) {
5803            let len = __tmp.len();
5804            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5805        } else {
5806            __tmp.len()
5807        }
5808    }
5809}
5810#[doc = "id: 148"]
5811#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
5812#[derive(Debug, Clone, PartialEq)]
5813#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5814#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5815pub struct AUTOPILOT_VERSION_DATA {
5816    #[doc = "Bitmap of capabilities"]
5817    pub capabilities: MavProtocolCapability,
5818    #[doc = "UID if provided by hardware (see uid2)"]
5819    pub uid: u64,
5820    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
5821    pub flight_sw_version: u32,
5822    #[doc = "Middleware version number"]
5823    pub middleware_sw_version: u32,
5824    #[doc = "Operating system version number"]
5825    pub os_sw_version: u32,
5826    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
5827    pub board_version: u32,
5828    #[doc = "ID of the board vendor"]
5829    pub vendor_id: u16,
5830    #[doc = "ID of the product"]
5831    pub product_id: u16,
5832    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5833    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5834    pub flight_custom_version: [u8; 8],
5835    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5836    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5837    pub middleware_custom_version: [u8; 8],
5838    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5840    pub os_custom_version: [u8; 8],
5841    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
5842    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5843    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5844    pub uid2: [u8; 18],
5845}
5846impl AUTOPILOT_VERSION_DATA {
5847    pub const ENCODED_LEN: usize = 78usize;
5848    pub const DEFAULT: Self = Self {
5849        capabilities: MavProtocolCapability::DEFAULT,
5850        uid: 0_u64,
5851        flight_sw_version: 0_u32,
5852        middleware_sw_version: 0_u32,
5853        os_sw_version: 0_u32,
5854        board_version: 0_u32,
5855        vendor_id: 0_u16,
5856        product_id: 0_u16,
5857        flight_custom_version: [0_u8; 8usize],
5858        middleware_custom_version: [0_u8; 8usize],
5859        os_custom_version: [0_u8; 8usize],
5860        uid2: [0_u8; 18usize],
5861    };
5862    #[cfg(feature = "arbitrary")]
5863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5864        use arbitrary::{Arbitrary, Unstructured};
5865        let mut buf = [0u8; 1024];
5866        rng.fill_bytes(&mut buf);
5867        let mut unstructured = Unstructured::new(&buf);
5868        Self::arbitrary(&mut unstructured).unwrap_or_default()
5869    }
5870}
5871impl Default for AUTOPILOT_VERSION_DATA {
5872    fn default() -> Self {
5873        Self::DEFAULT.clone()
5874    }
5875}
5876impl MessageData for AUTOPILOT_VERSION_DATA {
5877    type Message = MavMessage;
5878    const ID: u32 = 148u32;
5879    const NAME: &'static str = "AUTOPILOT_VERSION";
5880    const EXTRA_CRC: u8 = 178u8;
5881    const ENCODED_LEN: usize = 78usize;
5882    fn deser(
5883        _version: MavlinkVersion,
5884        __input: &[u8],
5885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5886        let avail_len = __input.len();
5887        let mut payload_buf = [0; Self::ENCODED_LEN];
5888        let mut buf = if avail_len < Self::ENCODED_LEN {
5889            payload_buf[0..avail_len].copy_from_slice(__input);
5890            Bytes::new(&payload_buf)
5891        } else {
5892            Bytes::new(__input)
5893        };
5894        let mut __struct = Self::default();
5895        let tmp = buf.get_u64_le();
5896        __struct.capabilities = MavProtocolCapability::from_bits(
5897            tmp & MavProtocolCapability::all().bits(),
5898        )
5899        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5900            flag_type: "MavProtocolCapability",
5901            value: tmp as u32,
5902        })?;
5903        __struct.uid = buf.get_u64_le();
5904        __struct.flight_sw_version = buf.get_u32_le();
5905        __struct.middleware_sw_version = buf.get_u32_le();
5906        __struct.os_sw_version = buf.get_u32_le();
5907        __struct.board_version = buf.get_u32_le();
5908        __struct.vendor_id = buf.get_u16_le();
5909        __struct.product_id = buf.get_u16_le();
5910        for v in &mut __struct.flight_custom_version {
5911            let val = buf.get_u8();
5912            *v = val;
5913        }
5914        for v in &mut __struct.middleware_custom_version {
5915            let val = buf.get_u8();
5916            *v = val;
5917        }
5918        for v in &mut __struct.os_custom_version {
5919            let val = buf.get_u8();
5920            *v = val;
5921        }
5922        for v in &mut __struct.uid2 {
5923            let val = buf.get_u8();
5924            *v = val;
5925        }
5926        Ok(__struct)
5927    }
5928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5929        let mut __tmp = BytesMut::new(bytes);
5930        #[allow(clippy::absurd_extreme_comparisons)]
5931        #[allow(unused_comparisons)]
5932        if __tmp.remaining() < Self::ENCODED_LEN {
5933            panic!(
5934                "buffer is too small (need {} bytes, but got {})",
5935                Self::ENCODED_LEN,
5936                __tmp.remaining(),
5937            )
5938        }
5939        __tmp.put_u64_le(self.capabilities.bits());
5940        __tmp.put_u64_le(self.uid);
5941        __tmp.put_u32_le(self.flight_sw_version);
5942        __tmp.put_u32_le(self.middleware_sw_version);
5943        __tmp.put_u32_le(self.os_sw_version);
5944        __tmp.put_u32_le(self.board_version);
5945        __tmp.put_u16_le(self.vendor_id);
5946        __tmp.put_u16_le(self.product_id);
5947        for val in &self.flight_custom_version {
5948            __tmp.put_u8(*val);
5949        }
5950        for val in &self.middleware_custom_version {
5951            __tmp.put_u8(*val);
5952        }
5953        for val in &self.os_custom_version {
5954            __tmp.put_u8(*val);
5955        }
5956        for val in &self.uid2 {
5957            __tmp.put_u8(*val);
5958        }
5959        if matches!(version, MavlinkVersion::V2) {
5960            let len = __tmp.len();
5961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5962        } else {
5963            __tmp.len()
5964        }
5965    }
5966}
5967#[doc = "id: 435"]
5968#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
5969#[derive(Debug, Clone, PartialEq)]
5970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5972pub struct AVAILABLE_MODES_DATA {
5973    #[doc = "A bitfield for use for autopilot-specific flags"]
5974    pub custom_mode: u32,
5975    #[doc = "Mode properties."]
5976    pub properties: MavModeProperty,
5977    #[doc = "The total number of available modes for the current vehicle type."]
5978    pub number_modes: u8,
5979    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
5980    pub mode_index: u8,
5981    #[doc = "Standard mode."]
5982    pub standard_mode: MavStandardMode,
5983    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
5984    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5985    pub mode_name: [u8; 35],
5986}
5987impl AVAILABLE_MODES_DATA {
5988    pub const ENCODED_LEN: usize = 46usize;
5989    pub const DEFAULT: Self = Self {
5990        custom_mode: 0_u32,
5991        properties: MavModeProperty::DEFAULT,
5992        number_modes: 0_u8,
5993        mode_index: 0_u8,
5994        standard_mode: MavStandardMode::DEFAULT,
5995        mode_name: [0_u8; 35usize],
5996    };
5997    #[cfg(feature = "arbitrary")]
5998    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5999        use arbitrary::{Arbitrary, Unstructured};
6000        let mut buf = [0u8; 1024];
6001        rng.fill_bytes(&mut buf);
6002        let mut unstructured = Unstructured::new(&buf);
6003        Self::arbitrary(&mut unstructured).unwrap_or_default()
6004    }
6005}
6006impl Default for AVAILABLE_MODES_DATA {
6007    fn default() -> Self {
6008        Self::DEFAULT.clone()
6009    }
6010}
6011impl MessageData for AVAILABLE_MODES_DATA {
6012    type Message = MavMessage;
6013    const ID: u32 = 435u32;
6014    const NAME: &'static str = "AVAILABLE_MODES";
6015    const EXTRA_CRC: u8 = 134u8;
6016    const ENCODED_LEN: usize = 46usize;
6017    fn deser(
6018        _version: MavlinkVersion,
6019        __input: &[u8],
6020    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6021        let avail_len = __input.len();
6022        let mut payload_buf = [0; Self::ENCODED_LEN];
6023        let mut buf = if avail_len < Self::ENCODED_LEN {
6024            payload_buf[0..avail_len].copy_from_slice(__input);
6025            Bytes::new(&payload_buf)
6026        } else {
6027            Bytes::new(__input)
6028        };
6029        let mut __struct = Self::default();
6030        __struct.custom_mode = buf.get_u32_le();
6031        let tmp = buf.get_u32_le();
6032        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6033            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6034                flag_type: "MavModeProperty",
6035                value: tmp as u32,
6036            })?;
6037        __struct.number_modes = buf.get_u8();
6038        __struct.mode_index = buf.get_u8();
6039        let tmp = buf.get_u8();
6040        __struct.standard_mode =
6041            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6042                enum_type: "MavStandardMode",
6043                value: tmp as u32,
6044            })?;
6045        for v in &mut __struct.mode_name {
6046            let val = buf.get_u8();
6047            *v = val;
6048        }
6049        Ok(__struct)
6050    }
6051    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6052        let mut __tmp = BytesMut::new(bytes);
6053        #[allow(clippy::absurd_extreme_comparisons)]
6054        #[allow(unused_comparisons)]
6055        if __tmp.remaining() < Self::ENCODED_LEN {
6056            panic!(
6057                "buffer is too small (need {} bytes, but got {})",
6058                Self::ENCODED_LEN,
6059                __tmp.remaining(),
6060            )
6061        }
6062        __tmp.put_u32_le(self.custom_mode);
6063        __tmp.put_u32_le(self.properties.bits());
6064        __tmp.put_u8(self.number_modes);
6065        __tmp.put_u8(self.mode_index);
6066        __tmp.put_u8(self.standard_mode as u8);
6067        for val in &self.mode_name {
6068            __tmp.put_u8(*val);
6069        }
6070        if matches!(version, MavlinkVersion::V2) {
6071            let len = __tmp.len();
6072            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6073        } else {
6074            __tmp.len()
6075        }
6076    }
6077}
6078#[doc = "id: 437"]
6079#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6080#[derive(Debug, Clone, PartialEq)]
6081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6083pub struct AVAILABLE_MODES_MONITOR_DATA {
6084    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6085    pub seq: u8,
6086}
6087impl AVAILABLE_MODES_MONITOR_DATA {
6088    pub const ENCODED_LEN: usize = 1usize;
6089    pub const DEFAULT: Self = Self { seq: 0_u8 };
6090    #[cfg(feature = "arbitrary")]
6091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6092        use arbitrary::{Arbitrary, Unstructured};
6093        let mut buf = [0u8; 1024];
6094        rng.fill_bytes(&mut buf);
6095        let mut unstructured = Unstructured::new(&buf);
6096        Self::arbitrary(&mut unstructured).unwrap_or_default()
6097    }
6098}
6099impl Default for AVAILABLE_MODES_MONITOR_DATA {
6100    fn default() -> Self {
6101        Self::DEFAULT.clone()
6102    }
6103}
6104impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6105    type Message = MavMessage;
6106    const ID: u32 = 437u32;
6107    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6108    const EXTRA_CRC: u8 = 30u8;
6109    const ENCODED_LEN: usize = 1usize;
6110    fn deser(
6111        _version: MavlinkVersion,
6112        __input: &[u8],
6113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6114        let avail_len = __input.len();
6115        let mut payload_buf = [0; Self::ENCODED_LEN];
6116        let mut buf = if avail_len < Self::ENCODED_LEN {
6117            payload_buf[0..avail_len].copy_from_slice(__input);
6118            Bytes::new(&payload_buf)
6119        } else {
6120            Bytes::new(__input)
6121        };
6122        let mut __struct = Self::default();
6123        __struct.seq = buf.get_u8();
6124        Ok(__struct)
6125    }
6126    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6127        let mut __tmp = BytesMut::new(bytes);
6128        #[allow(clippy::absurd_extreme_comparisons)]
6129        #[allow(unused_comparisons)]
6130        if __tmp.remaining() < Self::ENCODED_LEN {
6131            panic!(
6132                "buffer is too small (need {} bytes, but got {})",
6133                Self::ENCODED_LEN,
6134                __tmp.remaining(),
6135            )
6136        }
6137        __tmp.put_u8(self.seq);
6138        if matches!(version, MavlinkVersion::V2) {
6139            let len = __tmp.len();
6140            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6141        } else {
6142            __tmp.len()
6143        }
6144    }
6145}
6146#[doc = "id: 372"]
6147#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6148#[derive(Debug, Clone, PartialEq)]
6149#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6150#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6151pub struct BATTERY_INFO_DATA {
6152    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6153    pub discharge_minimum_voltage: f32,
6154    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6155    pub charging_minimum_voltage: f32,
6156    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6157    pub resting_minimum_voltage: f32,
6158    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6159    pub charging_maximum_voltage: f32,
6160    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6161    pub charging_maximum_current: f32,
6162    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6163    pub nominal_voltage: f32,
6164    #[doc = "Maximum pack discharge current. 0: field not provided."]
6165    pub discharge_maximum_current: f32,
6166    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6167    pub discharge_maximum_burst_current: f32,
6168    #[doc = "Fully charged design capacity. 0: field not provided."]
6169    pub design_capacity: f32,
6170    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6171    pub full_charge_capacity: f32,
6172    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6173    pub cycle_count: u16,
6174    #[doc = "Battery weight. 0: field not provided."]
6175    pub weight: u16,
6176    #[doc = "Battery ID"]
6177    pub id: u8,
6178    #[doc = "Function of the battery."]
6179    pub battery_function: MavBatteryFunction,
6180    #[doc = "Type (chemistry) of the battery."]
6181    pub mavtype: MavBatteryType,
6182    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6183    pub state_of_health: u8,
6184    #[doc = "Number of battery cells in series. 0: field not provided."]
6185    pub cells_in_series: u8,
6186    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6188    pub manufacture_date: [u8; 9],
6189    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6190    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6191    pub serial_number: [u8; 32],
6192    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6193    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6194    pub name: [u8; 50],
6195}
6196impl BATTERY_INFO_DATA {
6197    pub const ENCODED_LEN: usize = 140usize;
6198    pub const DEFAULT: Self = Self {
6199        discharge_minimum_voltage: 0.0_f32,
6200        charging_minimum_voltage: 0.0_f32,
6201        resting_minimum_voltage: 0.0_f32,
6202        charging_maximum_voltage: 0.0_f32,
6203        charging_maximum_current: 0.0_f32,
6204        nominal_voltage: 0.0_f32,
6205        discharge_maximum_current: 0.0_f32,
6206        discharge_maximum_burst_current: 0.0_f32,
6207        design_capacity: 0.0_f32,
6208        full_charge_capacity: 0.0_f32,
6209        cycle_count: 0_u16,
6210        weight: 0_u16,
6211        id: 0_u8,
6212        battery_function: MavBatteryFunction::DEFAULT,
6213        mavtype: MavBatteryType::DEFAULT,
6214        state_of_health: 0_u8,
6215        cells_in_series: 0_u8,
6216        manufacture_date: [0_u8; 9usize],
6217        serial_number: [0_u8; 32usize],
6218        name: [0_u8; 50usize],
6219    };
6220    #[cfg(feature = "arbitrary")]
6221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6222        use arbitrary::{Arbitrary, Unstructured};
6223        let mut buf = [0u8; 1024];
6224        rng.fill_bytes(&mut buf);
6225        let mut unstructured = Unstructured::new(&buf);
6226        Self::arbitrary(&mut unstructured).unwrap_or_default()
6227    }
6228}
6229impl Default for BATTERY_INFO_DATA {
6230    fn default() -> Self {
6231        Self::DEFAULT.clone()
6232    }
6233}
6234impl MessageData for BATTERY_INFO_DATA {
6235    type Message = MavMessage;
6236    const ID: u32 = 372u32;
6237    const NAME: &'static str = "BATTERY_INFO";
6238    const EXTRA_CRC: u8 = 26u8;
6239    const ENCODED_LEN: usize = 140usize;
6240    fn deser(
6241        _version: MavlinkVersion,
6242        __input: &[u8],
6243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6244        let avail_len = __input.len();
6245        let mut payload_buf = [0; Self::ENCODED_LEN];
6246        let mut buf = if avail_len < Self::ENCODED_LEN {
6247            payload_buf[0..avail_len].copy_from_slice(__input);
6248            Bytes::new(&payload_buf)
6249        } else {
6250            Bytes::new(__input)
6251        };
6252        let mut __struct = Self::default();
6253        __struct.discharge_minimum_voltage = buf.get_f32_le();
6254        __struct.charging_minimum_voltage = buf.get_f32_le();
6255        __struct.resting_minimum_voltage = buf.get_f32_le();
6256        __struct.charging_maximum_voltage = buf.get_f32_le();
6257        __struct.charging_maximum_current = buf.get_f32_le();
6258        __struct.nominal_voltage = buf.get_f32_le();
6259        __struct.discharge_maximum_current = buf.get_f32_le();
6260        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6261        __struct.design_capacity = buf.get_f32_le();
6262        __struct.full_charge_capacity = buf.get_f32_le();
6263        __struct.cycle_count = buf.get_u16_le();
6264        __struct.weight = buf.get_u16_le();
6265        __struct.id = buf.get_u8();
6266        let tmp = buf.get_u8();
6267        __struct.battery_function =
6268            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6269                enum_type: "MavBatteryFunction",
6270                value: tmp as u32,
6271            })?;
6272        let tmp = buf.get_u8();
6273        __struct.mavtype =
6274            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6275                enum_type: "MavBatteryType",
6276                value: tmp as u32,
6277            })?;
6278        __struct.state_of_health = buf.get_u8();
6279        __struct.cells_in_series = buf.get_u8();
6280        for v in &mut __struct.manufacture_date {
6281            let val = buf.get_u8();
6282            *v = val;
6283        }
6284        for v in &mut __struct.serial_number {
6285            let val = buf.get_u8();
6286            *v = val;
6287        }
6288        for v in &mut __struct.name {
6289            let val = buf.get_u8();
6290            *v = val;
6291        }
6292        Ok(__struct)
6293    }
6294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6295        let mut __tmp = BytesMut::new(bytes);
6296        #[allow(clippy::absurd_extreme_comparisons)]
6297        #[allow(unused_comparisons)]
6298        if __tmp.remaining() < Self::ENCODED_LEN {
6299            panic!(
6300                "buffer is too small (need {} bytes, but got {})",
6301                Self::ENCODED_LEN,
6302                __tmp.remaining(),
6303            )
6304        }
6305        __tmp.put_f32_le(self.discharge_minimum_voltage);
6306        __tmp.put_f32_le(self.charging_minimum_voltage);
6307        __tmp.put_f32_le(self.resting_minimum_voltage);
6308        __tmp.put_f32_le(self.charging_maximum_voltage);
6309        __tmp.put_f32_le(self.charging_maximum_current);
6310        __tmp.put_f32_le(self.nominal_voltage);
6311        __tmp.put_f32_le(self.discharge_maximum_current);
6312        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6313        __tmp.put_f32_le(self.design_capacity);
6314        __tmp.put_f32_le(self.full_charge_capacity);
6315        __tmp.put_u16_le(self.cycle_count);
6316        __tmp.put_u16_le(self.weight);
6317        __tmp.put_u8(self.id);
6318        __tmp.put_u8(self.battery_function as u8);
6319        __tmp.put_u8(self.mavtype as u8);
6320        __tmp.put_u8(self.state_of_health);
6321        __tmp.put_u8(self.cells_in_series);
6322        for val in &self.manufacture_date {
6323            __tmp.put_u8(*val);
6324        }
6325        for val in &self.serial_number {
6326            __tmp.put_u8(*val);
6327        }
6328        for val in &self.name {
6329            __tmp.put_u8(*val);
6330        }
6331        if matches!(version, MavlinkVersion::V2) {
6332            let len = __tmp.len();
6333            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6334        } else {
6335            __tmp.len()
6336        }
6337    }
6338}
6339#[doc = "id: 147"]
6340#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6341#[derive(Debug, Clone, PartialEq)]
6342#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6343#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6344pub struct BATTERY_STATUS_DATA {
6345    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6346    pub current_consumed: i32,
6347    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6348    pub energy_consumed: i32,
6349    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6350    pub temperature: i16,
6351    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6352    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6353    pub voltages: [u16; 10],
6354    #[doc = "Battery current, -1: autopilot does not measure the current"]
6355    pub current_battery: i16,
6356    #[doc = "Battery ID"]
6357    pub id: u8,
6358    #[doc = "Function of the battery"]
6359    pub battery_function: MavBatteryFunction,
6360    #[doc = "Type (chemistry) of the battery"]
6361    pub mavtype: MavBatteryType,
6362    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6363    pub battery_remaining: i8,
6364    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6365    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6366    pub time_remaining: i32,
6367    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6368    #[cfg_attr(feature = "serde", serde(default))]
6369    pub charge_state: MavBatteryChargeState,
6370    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6371    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6372    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6373    pub voltages_ext: [u16; 4],
6374    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6375    #[cfg_attr(feature = "serde", serde(default))]
6376    pub mode: MavBatteryMode,
6377    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6378    #[cfg_attr(feature = "serde", serde(default))]
6379    pub fault_bitmask: MavBatteryFault,
6380}
6381impl BATTERY_STATUS_DATA {
6382    pub const ENCODED_LEN: usize = 54usize;
6383    pub const DEFAULT: Self = Self {
6384        current_consumed: 0_i32,
6385        energy_consumed: 0_i32,
6386        temperature: 0_i16,
6387        voltages: [0_u16; 10usize],
6388        current_battery: 0_i16,
6389        id: 0_u8,
6390        battery_function: MavBatteryFunction::DEFAULT,
6391        mavtype: MavBatteryType::DEFAULT,
6392        battery_remaining: 0_i8,
6393        time_remaining: 0_i32,
6394        charge_state: MavBatteryChargeState::DEFAULT,
6395        voltages_ext: [0_u16; 4usize],
6396        mode: MavBatteryMode::DEFAULT,
6397        fault_bitmask: MavBatteryFault::DEFAULT,
6398    };
6399    #[cfg(feature = "arbitrary")]
6400    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6401        use arbitrary::{Arbitrary, Unstructured};
6402        let mut buf = [0u8; 1024];
6403        rng.fill_bytes(&mut buf);
6404        let mut unstructured = Unstructured::new(&buf);
6405        Self::arbitrary(&mut unstructured).unwrap_or_default()
6406    }
6407}
6408impl Default for BATTERY_STATUS_DATA {
6409    fn default() -> Self {
6410        Self::DEFAULT.clone()
6411    }
6412}
6413impl MessageData for BATTERY_STATUS_DATA {
6414    type Message = MavMessage;
6415    const ID: u32 = 147u32;
6416    const NAME: &'static str = "BATTERY_STATUS";
6417    const EXTRA_CRC: u8 = 154u8;
6418    const ENCODED_LEN: usize = 54usize;
6419    fn deser(
6420        _version: MavlinkVersion,
6421        __input: &[u8],
6422    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6423        let avail_len = __input.len();
6424        let mut payload_buf = [0; Self::ENCODED_LEN];
6425        let mut buf = if avail_len < Self::ENCODED_LEN {
6426            payload_buf[0..avail_len].copy_from_slice(__input);
6427            Bytes::new(&payload_buf)
6428        } else {
6429            Bytes::new(__input)
6430        };
6431        let mut __struct = Self::default();
6432        __struct.current_consumed = buf.get_i32_le();
6433        __struct.energy_consumed = buf.get_i32_le();
6434        __struct.temperature = buf.get_i16_le();
6435        for v in &mut __struct.voltages {
6436            let val = buf.get_u16_le();
6437            *v = val;
6438        }
6439        __struct.current_battery = buf.get_i16_le();
6440        __struct.id = buf.get_u8();
6441        let tmp = buf.get_u8();
6442        __struct.battery_function =
6443            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6444                enum_type: "MavBatteryFunction",
6445                value: tmp as u32,
6446            })?;
6447        let tmp = buf.get_u8();
6448        __struct.mavtype =
6449            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6450                enum_type: "MavBatteryType",
6451                value: tmp as u32,
6452            })?;
6453        __struct.battery_remaining = buf.get_i8();
6454        __struct.time_remaining = buf.get_i32_le();
6455        let tmp = buf.get_u8();
6456        __struct.charge_state =
6457            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6458                enum_type: "MavBatteryChargeState",
6459                value: tmp as u32,
6460            })?;
6461        for v in &mut __struct.voltages_ext {
6462            let val = buf.get_u16_le();
6463            *v = val;
6464        }
6465        let tmp = buf.get_u8();
6466        __struct.mode =
6467            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6468                enum_type: "MavBatteryMode",
6469                value: tmp as u32,
6470            })?;
6471        let tmp = buf.get_u32_le();
6472        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6473            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6474                flag_type: "MavBatteryFault",
6475                value: tmp as u32,
6476            })?;
6477        Ok(__struct)
6478    }
6479    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6480        let mut __tmp = BytesMut::new(bytes);
6481        #[allow(clippy::absurd_extreme_comparisons)]
6482        #[allow(unused_comparisons)]
6483        if __tmp.remaining() < Self::ENCODED_LEN {
6484            panic!(
6485                "buffer is too small (need {} bytes, but got {})",
6486                Self::ENCODED_LEN,
6487                __tmp.remaining(),
6488            )
6489        }
6490        __tmp.put_i32_le(self.current_consumed);
6491        __tmp.put_i32_le(self.energy_consumed);
6492        __tmp.put_i16_le(self.temperature);
6493        for val in &self.voltages {
6494            __tmp.put_u16_le(*val);
6495        }
6496        __tmp.put_i16_le(self.current_battery);
6497        __tmp.put_u8(self.id);
6498        __tmp.put_u8(self.battery_function as u8);
6499        __tmp.put_u8(self.mavtype as u8);
6500        __tmp.put_i8(self.battery_remaining);
6501        __tmp.put_i32_le(self.time_remaining);
6502        __tmp.put_u8(self.charge_state as u8);
6503        for val in &self.voltages_ext {
6504            __tmp.put_u16_le(*val);
6505        }
6506        __tmp.put_u8(self.mode as u8);
6507        __tmp.put_u32_le(self.fault_bitmask.bits());
6508        if matches!(version, MavlinkVersion::V2) {
6509            let len = __tmp.len();
6510            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6511        } else {
6512            __tmp.len()
6513        }
6514    }
6515}
6516#[doc = "id: 257"]
6517#[doc = "Report button state change."]
6518#[derive(Debug, Clone, PartialEq)]
6519#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6520#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6521pub struct BUTTON_CHANGE_DATA {
6522    #[doc = "Timestamp (time since system boot)."]
6523    pub time_boot_ms: u32,
6524    #[doc = "Time of last change of button state."]
6525    pub last_change_ms: u32,
6526    #[doc = "Bitmap for state of buttons."]
6527    pub state: u8,
6528}
6529impl BUTTON_CHANGE_DATA {
6530    pub const ENCODED_LEN: usize = 9usize;
6531    pub const DEFAULT: Self = Self {
6532        time_boot_ms: 0_u32,
6533        last_change_ms: 0_u32,
6534        state: 0_u8,
6535    };
6536    #[cfg(feature = "arbitrary")]
6537    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6538        use arbitrary::{Arbitrary, Unstructured};
6539        let mut buf = [0u8; 1024];
6540        rng.fill_bytes(&mut buf);
6541        let mut unstructured = Unstructured::new(&buf);
6542        Self::arbitrary(&mut unstructured).unwrap_or_default()
6543    }
6544}
6545impl Default for BUTTON_CHANGE_DATA {
6546    fn default() -> Self {
6547        Self::DEFAULT.clone()
6548    }
6549}
6550impl MessageData for BUTTON_CHANGE_DATA {
6551    type Message = MavMessage;
6552    const ID: u32 = 257u32;
6553    const NAME: &'static str = "BUTTON_CHANGE";
6554    const EXTRA_CRC: u8 = 131u8;
6555    const ENCODED_LEN: usize = 9usize;
6556    fn deser(
6557        _version: MavlinkVersion,
6558        __input: &[u8],
6559    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6560        let avail_len = __input.len();
6561        let mut payload_buf = [0; Self::ENCODED_LEN];
6562        let mut buf = if avail_len < Self::ENCODED_LEN {
6563            payload_buf[0..avail_len].copy_from_slice(__input);
6564            Bytes::new(&payload_buf)
6565        } else {
6566            Bytes::new(__input)
6567        };
6568        let mut __struct = Self::default();
6569        __struct.time_boot_ms = buf.get_u32_le();
6570        __struct.last_change_ms = buf.get_u32_le();
6571        __struct.state = buf.get_u8();
6572        Ok(__struct)
6573    }
6574    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6575        let mut __tmp = BytesMut::new(bytes);
6576        #[allow(clippy::absurd_extreme_comparisons)]
6577        #[allow(unused_comparisons)]
6578        if __tmp.remaining() < Self::ENCODED_LEN {
6579            panic!(
6580                "buffer is too small (need {} bytes, but got {})",
6581                Self::ENCODED_LEN,
6582                __tmp.remaining(),
6583            )
6584        }
6585        __tmp.put_u32_le(self.time_boot_ms);
6586        __tmp.put_u32_le(self.last_change_ms);
6587        __tmp.put_u8(self.state);
6588        if matches!(version, MavlinkVersion::V2) {
6589            let len = __tmp.len();
6590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6591        } else {
6592            __tmp.len()
6593        }
6594    }
6595}
6596#[doc = "id: 262"]
6597#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6598#[derive(Debug, Clone, PartialEq)]
6599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6601pub struct CAMERA_CAPTURE_STATUS_DATA {
6602    #[doc = "Timestamp (time since system boot)."]
6603    pub time_boot_ms: u32,
6604    #[doc = "Image capture interval"]
6605    pub image_interval: f32,
6606    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6607    pub recording_time_ms: u32,
6608    #[doc = "Available storage capacity."]
6609    pub available_capacity: f32,
6610    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6611    pub image_status: u8,
6612    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6613    pub video_status: u8,
6614    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6615    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6616    pub image_count: i32,
6617    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6618    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6619    pub camera_device_id: u8,
6620}
6621impl CAMERA_CAPTURE_STATUS_DATA {
6622    pub const ENCODED_LEN: usize = 23usize;
6623    pub const DEFAULT: Self = Self {
6624        time_boot_ms: 0_u32,
6625        image_interval: 0.0_f32,
6626        recording_time_ms: 0_u32,
6627        available_capacity: 0.0_f32,
6628        image_status: 0_u8,
6629        video_status: 0_u8,
6630        image_count: 0_i32,
6631        camera_device_id: 0_u8,
6632    };
6633    #[cfg(feature = "arbitrary")]
6634    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6635        use arbitrary::{Arbitrary, Unstructured};
6636        let mut buf = [0u8; 1024];
6637        rng.fill_bytes(&mut buf);
6638        let mut unstructured = Unstructured::new(&buf);
6639        Self::arbitrary(&mut unstructured).unwrap_or_default()
6640    }
6641}
6642impl Default for CAMERA_CAPTURE_STATUS_DATA {
6643    fn default() -> Self {
6644        Self::DEFAULT.clone()
6645    }
6646}
6647impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6648    type Message = MavMessage;
6649    const ID: u32 = 262u32;
6650    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6651    const EXTRA_CRC: u8 = 12u8;
6652    const ENCODED_LEN: usize = 23usize;
6653    fn deser(
6654        _version: MavlinkVersion,
6655        __input: &[u8],
6656    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6657        let avail_len = __input.len();
6658        let mut payload_buf = [0; Self::ENCODED_LEN];
6659        let mut buf = if avail_len < Self::ENCODED_LEN {
6660            payload_buf[0..avail_len].copy_from_slice(__input);
6661            Bytes::new(&payload_buf)
6662        } else {
6663            Bytes::new(__input)
6664        };
6665        let mut __struct = Self::default();
6666        __struct.time_boot_ms = buf.get_u32_le();
6667        __struct.image_interval = buf.get_f32_le();
6668        __struct.recording_time_ms = buf.get_u32_le();
6669        __struct.available_capacity = buf.get_f32_le();
6670        __struct.image_status = buf.get_u8();
6671        __struct.video_status = buf.get_u8();
6672        __struct.image_count = buf.get_i32_le();
6673        __struct.camera_device_id = buf.get_u8();
6674        Ok(__struct)
6675    }
6676    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6677        let mut __tmp = BytesMut::new(bytes);
6678        #[allow(clippy::absurd_extreme_comparisons)]
6679        #[allow(unused_comparisons)]
6680        if __tmp.remaining() < Self::ENCODED_LEN {
6681            panic!(
6682                "buffer is too small (need {} bytes, but got {})",
6683                Self::ENCODED_LEN,
6684                __tmp.remaining(),
6685            )
6686        }
6687        __tmp.put_u32_le(self.time_boot_ms);
6688        __tmp.put_f32_le(self.image_interval);
6689        __tmp.put_u32_le(self.recording_time_ms);
6690        __tmp.put_f32_le(self.available_capacity);
6691        __tmp.put_u8(self.image_status);
6692        __tmp.put_u8(self.video_status);
6693        __tmp.put_i32_le(self.image_count);
6694        __tmp.put_u8(self.camera_device_id);
6695        if matches!(version, MavlinkVersion::V2) {
6696            let len = __tmp.len();
6697            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6698        } else {
6699            __tmp.len()
6700        }
6701    }
6702}
6703#[doc = "id: 271"]
6704#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6705#[derive(Debug, Clone, PartialEq)]
6706#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6707#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6708pub struct CAMERA_FOV_STATUS_DATA {
6709    #[doc = "Timestamp (time since system boot)."]
6710    pub time_boot_ms: u32,
6711    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
6712    pub lat_camera: i32,
6713    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
6714    pub lon_camera: i32,
6715    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
6716    pub alt_camera: i32,
6717    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6718    pub lat_image: i32,
6719    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6720    pub lon_image: i32,
6721    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6722    pub alt_image: i32,
6723    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6724    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6725    pub q: [f32; 4],
6726    #[doc = "Horizontal field of view (NaN if unknown)."]
6727    pub hfov: f32,
6728    #[doc = "Vertical field of view (NaN if unknown)."]
6729    pub vfov: f32,
6730    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6731    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6732    pub camera_device_id: u8,
6733}
6734impl CAMERA_FOV_STATUS_DATA {
6735    pub const ENCODED_LEN: usize = 53usize;
6736    pub const DEFAULT: Self = Self {
6737        time_boot_ms: 0_u32,
6738        lat_camera: 0_i32,
6739        lon_camera: 0_i32,
6740        alt_camera: 0_i32,
6741        lat_image: 0_i32,
6742        lon_image: 0_i32,
6743        alt_image: 0_i32,
6744        q: [0.0_f32; 4usize],
6745        hfov: 0.0_f32,
6746        vfov: 0.0_f32,
6747        camera_device_id: 0_u8,
6748    };
6749    #[cfg(feature = "arbitrary")]
6750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6751        use arbitrary::{Arbitrary, Unstructured};
6752        let mut buf = [0u8; 1024];
6753        rng.fill_bytes(&mut buf);
6754        let mut unstructured = Unstructured::new(&buf);
6755        Self::arbitrary(&mut unstructured).unwrap_or_default()
6756    }
6757}
6758impl Default for CAMERA_FOV_STATUS_DATA {
6759    fn default() -> Self {
6760        Self::DEFAULT.clone()
6761    }
6762}
6763impl MessageData for CAMERA_FOV_STATUS_DATA {
6764    type Message = MavMessage;
6765    const ID: u32 = 271u32;
6766    const NAME: &'static str = "CAMERA_FOV_STATUS";
6767    const EXTRA_CRC: u8 = 22u8;
6768    const ENCODED_LEN: usize = 53usize;
6769    fn deser(
6770        _version: MavlinkVersion,
6771        __input: &[u8],
6772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6773        let avail_len = __input.len();
6774        let mut payload_buf = [0; Self::ENCODED_LEN];
6775        let mut buf = if avail_len < Self::ENCODED_LEN {
6776            payload_buf[0..avail_len].copy_from_slice(__input);
6777            Bytes::new(&payload_buf)
6778        } else {
6779            Bytes::new(__input)
6780        };
6781        let mut __struct = Self::default();
6782        __struct.time_boot_ms = buf.get_u32_le();
6783        __struct.lat_camera = buf.get_i32_le();
6784        __struct.lon_camera = buf.get_i32_le();
6785        __struct.alt_camera = buf.get_i32_le();
6786        __struct.lat_image = buf.get_i32_le();
6787        __struct.lon_image = buf.get_i32_le();
6788        __struct.alt_image = buf.get_i32_le();
6789        for v in &mut __struct.q {
6790            let val = buf.get_f32_le();
6791            *v = val;
6792        }
6793        __struct.hfov = buf.get_f32_le();
6794        __struct.vfov = buf.get_f32_le();
6795        __struct.camera_device_id = buf.get_u8();
6796        Ok(__struct)
6797    }
6798    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6799        let mut __tmp = BytesMut::new(bytes);
6800        #[allow(clippy::absurd_extreme_comparisons)]
6801        #[allow(unused_comparisons)]
6802        if __tmp.remaining() < Self::ENCODED_LEN {
6803            panic!(
6804                "buffer is too small (need {} bytes, but got {})",
6805                Self::ENCODED_LEN,
6806                __tmp.remaining(),
6807            )
6808        }
6809        __tmp.put_u32_le(self.time_boot_ms);
6810        __tmp.put_i32_le(self.lat_camera);
6811        __tmp.put_i32_le(self.lon_camera);
6812        __tmp.put_i32_le(self.alt_camera);
6813        __tmp.put_i32_le(self.lat_image);
6814        __tmp.put_i32_le(self.lon_image);
6815        __tmp.put_i32_le(self.alt_image);
6816        for val in &self.q {
6817            __tmp.put_f32_le(*val);
6818        }
6819        __tmp.put_f32_le(self.hfov);
6820        __tmp.put_f32_le(self.vfov);
6821        __tmp.put_u8(self.camera_device_id);
6822        if matches!(version, MavlinkVersion::V2) {
6823            let len = __tmp.len();
6824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6825        } else {
6826            __tmp.len()
6827        }
6828    }
6829}
6830#[doc = "id: 263"]
6831#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
6832#[derive(Debug, Clone, PartialEq)]
6833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6834#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6835pub struct CAMERA_IMAGE_CAPTURED_DATA {
6836    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
6837    pub time_utc: u64,
6838    #[doc = "Timestamp (time since system boot)."]
6839    pub time_boot_ms: u32,
6840    #[doc = "Latitude where image was taken"]
6841    pub lat: i32,
6842    #[doc = "Longitude where capture was taken"]
6843    pub lon: i32,
6844    #[doc = "Altitude (MSL) where image was taken"]
6845    pub alt: i32,
6846    #[doc = "Altitude above ground"]
6847    pub relative_alt: i32,
6848    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6849    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6850    pub q: [f32; 4],
6851    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
6852    pub image_index: i32,
6853    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
6854    pub camera_id: u8,
6855    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
6856    pub capture_result: i8,
6857    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
6858    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6859    pub file_url: [u8; 205],
6860}
6861impl CAMERA_IMAGE_CAPTURED_DATA {
6862    pub const ENCODED_LEN: usize = 255usize;
6863    pub const DEFAULT: Self = Self {
6864        time_utc: 0_u64,
6865        time_boot_ms: 0_u32,
6866        lat: 0_i32,
6867        lon: 0_i32,
6868        alt: 0_i32,
6869        relative_alt: 0_i32,
6870        q: [0.0_f32; 4usize],
6871        image_index: 0_i32,
6872        camera_id: 0_u8,
6873        capture_result: 0_i8,
6874        file_url: [0_u8; 205usize],
6875    };
6876    #[cfg(feature = "arbitrary")]
6877    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6878        use arbitrary::{Arbitrary, Unstructured};
6879        let mut buf = [0u8; 1024];
6880        rng.fill_bytes(&mut buf);
6881        let mut unstructured = Unstructured::new(&buf);
6882        Self::arbitrary(&mut unstructured).unwrap_or_default()
6883    }
6884}
6885impl Default for CAMERA_IMAGE_CAPTURED_DATA {
6886    fn default() -> Self {
6887        Self::DEFAULT.clone()
6888    }
6889}
6890impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
6891    type Message = MavMessage;
6892    const ID: u32 = 263u32;
6893    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
6894    const EXTRA_CRC: u8 = 133u8;
6895    const ENCODED_LEN: usize = 255usize;
6896    fn deser(
6897        _version: MavlinkVersion,
6898        __input: &[u8],
6899    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6900        let avail_len = __input.len();
6901        let mut payload_buf = [0; Self::ENCODED_LEN];
6902        let mut buf = if avail_len < Self::ENCODED_LEN {
6903            payload_buf[0..avail_len].copy_from_slice(__input);
6904            Bytes::new(&payload_buf)
6905        } else {
6906            Bytes::new(__input)
6907        };
6908        let mut __struct = Self::default();
6909        __struct.time_utc = buf.get_u64_le();
6910        __struct.time_boot_ms = buf.get_u32_le();
6911        __struct.lat = buf.get_i32_le();
6912        __struct.lon = buf.get_i32_le();
6913        __struct.alt = buf.get_i32_le();
6914        __struct.relative_alt = buf.get_i32_le();
6915        for v in &mut __struct.q {
6916            let val = buf.get_f32_le();
6917            *v = val;
6918        }
6919        __struct.image_index = buf.get_i32_le();
6920        __struct.camera_id = buf.get_u8();
6921        __struct.capture_result = buf.get_i8();
6922        for v in &mut __struct.file_url {
6923            let val = buf.get_u8();
6924            *v = val;
6925        }
6926        Ok(__struct)
6927    }
6928    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6929        let mut __tmp = BytesMut::new(bytes);
6930        #[allow(clippy::absurd_extreme_comparisons)]
6931        #[allow(unused_comparisons)]
6932        if __tmp.remaining() < Self::ENCODED_LEN {
6933            panic!(
6934                "buffer is too small (need {} bytes, but got {})",
6935                Self::ENCODED_LEN,
6936                __tmp.remaining(),
6937            )
6938        }
6939        __tmp.put_u64_le(self.time_utc);
6940        __tmp.put_u32_le(self.time_boot_ms);
6941        __tmp.put_i32_le(self.lat);
6942        __tmp.put_i32_le(self.lon);
6943        __tmp.put_i32_le(self.alt);
6944        __tmp.put_i32_le(self.relative_alt);
6945        for val in &self.q {
6946            __tmp.put_f32_le(*val);
6947        }
6948        __tmp.put_i32_le(self.image_index);
6949        __tmp.put_u8(self.camera_id);
6950        __tmp.put_i8(self.capture_result);
6951        for val in &self.file_url {
6952            __tmp.put_u8(*val);
6953        }
6954        if matches!(version, MavlinkVersion::V2) {
6955            let len = __tmp.len();
6956            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6957        } else {
6958            __tmp.len()
6959        }
6960    }
6961}
6962#[doc = "id: 259"]
6963#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6964#[derive(Debug, Clone, PartialEq)]
6965#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6966#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6967pub struct CAMERA_INFORMATION_DATA {
6968    #[doc = "Timestamp (time since system boot)."]
6969    pub time_boot_ms: u32,
6970    #[doc = "0xff). Use 0 if not known."]
6971    pub firmware_version: u32,
6972    #[doc = "Focal length. Use NaN if not known."]
6973    pub focal_length: f32,
6974    #[doc = "Image sensor size horizontal. Use NaN if not known."]
6975    pub sensor_size_h: f32,
6976    #[doc = "Image sensor size vertical. Use NaN if not known."]
6977    pub sensor_size_v: f32,
6978    #[doc = "Bitmap of camera capability flags."]
6979    pub flags: CameraCapFlags,
6980    #[doc = "Horizontal image resolution. Use 0 if not known."]
6981    pub resolution_h: u16,
6982    #[doc = "Vertical image resolution. Use 0 if not known."]
6983    pub resolution_v: u16,
6984    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
6985    pub cam_definition_version: u16,
6986    #[doc = "Name of the camera vendor"]
6987    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6988    pub vendor_name: [u8; 32],
6989    #[doc = "Name of the camera model"]
6990    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6991    pub model_name: [u8; 32],
6992    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
6993    pub lens_id: u8,
6994    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
6995    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6996    pub cam_definition_uri: [u8; 140],
6997    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
6998    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6999    pub gimbal_device_id: u8,
7000    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7001    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7002    pub camera_device_id: u8,
7003}
7004impl CAMERA_INFORMATION_DATA {
7005    pub const ENCODED_LEN: usize = 237usize;
7006    pub const DEFAULT: Self = Self {
7007        time_boot_ms: 0_u32,
7008        firmware_version: 0_u32,
7009        focal_length: 0.0_f32,
7010        sensor_size_h: 0.0_f32,
7011        sensor_size_v: 0.0_f32,
7012        flags: CameraCapFlags::DEFAULT,
7013        resolution_h: 0_u16,
7014        resolution_v: 0_u16,
7015        cam_definition_version: 0_u16,
7016        vendor_name: [0_u8; 32usize],
7017        model_name: [0_u8; 32usize],
7018        lens_id: 0_u8,
7019        cam_definition_uri: [0_u8; 140usize],
7020        gimbal_device_id: 0_u8,
7021        camera_device_id: 0_u8,
7022    };
7023    #[cfg(feature = "arbitrary")]
7024    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7025        use arbitrary::{Arbitrary, Unstructured};
7026        let mut buf = [0u8; 1024];
7027        rng.fill_bytes(&mut buf);
7028        let mut unstructured = Unstructured::new(&buf);
7029        Self::arbitrary(&mut unstructured).unwrap_or_default()
7030    }
7031}
7032impl Default for CAMERA_INFORMATION_DATA {
7033    fn default() -> Self {
7034        Self::DEFAULT.clone()
7035    }
7036}
7037impl MessageData for CAMERA_INFORMATION_DATA {
7038    type Message = MavMessage;
7039    const ID: u32 = 259u32;
7040    const NAME: &'static str = "CAMERA_INFORMATION";
7041    const EXTRA_CRC: u8 = 92u8;
7042    const ENCODED_LEN: usize = 237usize;
7043    fn deser(
7044        _version: MavlinkVersion,
7045        __input: &[u8],
7046    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7047        let avail_len = __input.len();
7048        let mut payload_buf = [0; Self::ENCODED_LEN];
7049        let mut buf = if avail_len < Self::ENCODED_LEN {
7050            payload_buf[0..avail_len].copy_from_slice(__input);
7051            Bytes::new(&payload_buf)
7052        } else {
7053            Bytes::new(__input)
7054        };
7055        let mut __struct = Self::default();
7056        __struct.time_boot_ms = buf.get_u32_le();
7057        __struct.firmware_version = buf.get_u32_le();
7058        __struct.focal_length = buf.get_f32_le();
7059        __struct.sensor_size_h = buf.get_f32_le();
7060        __struct.sensor_size_v = buf.get_f32_le();
7061        let tmp = buf.get_u32_le();
7062        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7063            ::mavlink_core::error::ParserError::InvalidFlag {
7064                flag_type: "CameraCapFlags",
7065                value: tmp as u32,
7066            },
7067        )?;
7068        __struct.resolution_h = buf.get_u16_le();
7069        __struct.resolution_v = buf.get_u16_le();
7070        __struct.cam_definition_version = buf.get_u16_le();
7071        for v in &mut __struct.vendor_name {
7072            let val = buf.get_u8();
7073            *v = val;
7074        }
7075        for v in &mut __struct.model_name {
7076            let val = buf.get_u8();
7077            *v = val;
7078        }
7079        __struct.lens_id = buf.get_u8();
7080        for v in &mut __struct.cam_definition_uri {
7081            let val = buf.get_u8();
7082            *v = val;
7083        }
7084        __struct.gimbal_device_id = buf.get_u8();
7085        __struct.camera_device_id = buf.get_u8();
7086        Ok(__struct)
7087    }
7088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7089        let mut __tmp = BytesMut::new(bytes);
7090        #[allow(clippy::absurd_extreme_comparisons)]
7091        #[allow(unused_comparisons)]
7092        if __tmp.remaining() < Self::ENCODED_LEN {
7093            panic!(
7094                "buffer is too small (need {} bytes, but got {})",
7095                Self::ENCODED_LEN,
7096                __tmp.remaining(),
7097            )
7098        }
7099        __tmp.put_u32_le(self.time_boot_ms);
7100        __tmp.put_u32_le(self.firmware_version);
7101        __tmp.put_f32_le(self.focal_length);
7102        __tmp.put_f32_le(self.sensor_size_h);
7103        __tmp.put_f32_le(self.sensor_size_v);
7104        __tmp.put_u32_le(self.flags.bits());
7105        __tmp.put_u16_le(self.resolution_h);
7106        __tmp.put_u16_le(self.resolution_v);
7107        __tmp.put_u16_le(self.cam_definition_version);
7108        for val in &self.vendor_name {
7109            __tmp.put_u8(*val);
7110        }
7111        for val in &self.model_name {
7112            __tmp.put_u8(*val);
7113        }
7114        __tmp.put_u8(self.lens_id);
7115        for val in &self.cam_definition_uri {
7116            __tmp.put_u8(*val);
7117        }
7118        __tmp.put_u8(self.gimbal_device_id);
7119        __tmp.put_u8(self.camera_device_id);
7120        if matches!(version, MavlinkVersion::V2) {
7121            let len = __tmp.len();
7122            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7123        } else {
7124            __tmp.len()
7125        }
7126    }
7127}
7128#[doc = "id: 260"]
7129#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7130#[derive(Debug, Clone, PartialEq)]
7131#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7132#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7133pub struct CAMERA_SETTINGS_DATA {
7134    #[doc = "Timestamp (time since system boot)."]
7135    pub time_boot_ms: u32,
7136    #[doc = "Camera mode"]
7137    pub mode_id: CameraMode,
7138    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7139    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7140    pub zoomLevel: f32,
7141    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7142    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7143    pub focusLevel: f32,
7144    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7145    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7146    pub camera_device_id: u8,
7147}
7148impl CAMERA_SETTINGS_DATA {
7149    pub const ENCODED_LEN: usize = 14usize;
7150    pub const DEFAULT: Self = Self {
7151        time_boot_ms: 0_u32,
7152        mode_id: CameraMode::DEFAULT,
7153        zoomLevel: 0.0_f32,
7154        focusLevel: 0.0_f32,
7155        camera_device_id: 0_u8,
7156    };
7157    #[cfg(feature = "arbitrary")]
7158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7159        use arbitrary::{Arbitrary, Unstructured};
7160        let mut buf = [0u8; 1024];
7161        rng.fill_bytes(&mut buf);
7162        let mut unstructured = Unstructured::new(&buf);
7163        Self::arbitrary(&mut unstructured).unwrap_or_default()
7164    }
7165}
7166impl Default for CAMERA_SETTINGS_DATA {
7167    fn default() -> Self {
7168        Self::DEFAULT.clone()
7169    }
7170}
7171impl MessageData for CAMERA_SETTINGS_DATA {
7172    type Message = MavMessage;
7173    const ID: u32 = 260u32;
7174    const NAME: &'static str = "CAMERA_SETTINGS";
7175    const EXTRA_CRC: u8 = 146u8;
7176    const ENCODED_LEN: usize = 14usize;
7177    fn deser(
7178        _version: MavlinkVersion,
7179        __input: &[u8],
7180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7181        let avail_len = __input.len();
7182        let mut payload_buf = [0; Self::ENCODED_LEN];
7183        let mut buf = if avail_len < Self::ENCODED_LEN {
7184            payload_buf[0..avail_len].copy_from_slice(__input);
7185            Bytes::new(&payload_buf)
7186        } else {
7187            Bytes::new(__input)
7188        };
7189        let mut __struct = Self::default();
7190        __struct.time_boot_ms = buf.get_u32_le();
7191        let tmp = buf.get_u8();
7192        __struct.mode_id =
7193            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7194                enum_type: "CameraMode",
7195                value: tmp as u32,
7196            })?;
7197        __struct.zoomLevel = buf.get_f32_le();
7198        __struct.focusLevel = buf.get_f32_le();
7199        __struct.camera_device_id = buf.get_u8();
7200        Ok(__struct)
7201    }
7202    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7203        let mut __tmp = BytesMut::new(bytes);
7204        #[allow(clippy::absurd_extreme_comparisons)]
7205        #[allow(unused_comparisons)]
7206        if __tmp.remaining() < Self::ENCODED_LEN {
7207            panic!(
7208                "buffer is too small (need {} bytes, but got {})",
7209                Self::ENCODED_LEN,
7210                __tmp.remaining(),
7211            )
7212        }
7213        __tmp.put_u32_le(self.time_boot_ms);
7214        __tmp.put_u8(self.mode_id as u8);
7215        __tmp.put_f32_le(self.zoomLevel);
7216        __tmp.put_f32_le(self.focusLevel);
7217        __tmp.put_u8(self.camera_device_id);
7218        if matches!(version, MavlinkVersion::V2) {
7219            let len = __tmp.len();
7220            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7221        } else {
7222            __tmp.len()
7223        }
7224    }
7225}
7226#[doc = "id: 277"]
7227#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7228#[derive(Debug, Clone, PartialEq)]
7229#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7230#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7231pub struct CAMERA_THERMAL_RANGE_DATA {
7232    #[doc = "Timestamp (time since system boot)."]
7233    pub time_boot_ms: u32,
7234    #[doc = "Temperature max."]
7235    pub max: f32,
7236    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7237    pub max_point_x: f32,
7238    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7239    pub max_point_y: f32,
7240    #[doc = "Temperature min."]
7241    pub min: f32,
7242    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7243    pub min_point_x: f32,
7244    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7245    pub min_point_y: f32,
7246    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7247    pub stream_id: u8,
7248    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7249    pub camera_device_id: u8,
7250}
7251impl CAMERA_THERMAL_RANGE_DATA {
7252    pub const ENCODED_LEN: usize = 30usize;
7253    pub const DEFAULT: Self = Self {
7254        time_boot_ms: 0_u32,
7255        max: 0.0_f32,
7256        max_point_x: 0.0_f32,
7257        max_point_y: 0.0_f32,
7258        min: 0.0_f32,
7259        min_point_x: 0.0_f32,
7260        min_point_y: 0.0_f32,
7261        stream_id: 0_u8,
7262        camera_device_id: 0_u8,
7263    };
7264    #[cfg(feature = "arbitrary")]
7265    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7266        use arbitrary::{Arbitrary, Unstructured};
7267        let mut buf = [0u8; 1024];
7268        rng.fill_bytes(&mut buf);
7269        let mut unstructured = Unstructured::new(&buf);
7270        Self::arbitrary(&mut unstructured).unwrap_or_default()
7271    }
7272}
7273impl Default for CAMERA_THERMAL_RANGE_DATA {
7274    fn default() -> Self {
7275        Self::DEFAULT.clone()
7276    }
7277}
7278impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7279    type Message = MavMessage;
7280    const ID: u32 = 277u32;
7281    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7282    const EXTRA_CRC: u8 = 62u8;
7283    const ENCODED_LEN: usize = 30usize;
7284    fn deser(
7285        _version: MavlinkVersion,
7286        __input: &[u8],
7287    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7288        let avail_len = __input.len();
7289        let mut payload_buf = [0; Self::ENCODED_LEN];
7290        let mut buf = if avail_len < Self::ENCODED_LEN {
7291            payload_buf[0..avail_len].copy_from_slice(__input);
7292            Bytes::new(&payload_buf)
7293        } else {
7294            Bytes::new(__input)
7295        };
7296        let mut __struct = Self::default();
7297        __struct.time_boot_ms = buf.get_u32_le();
7298        __struct.max = buf.get_f32_le();
7299        __struct.max_point_x = buf.get_f32_le();
7300        __struct.max_point_y = buf.get_f32_le();
7301        __struct.min = buf.get_f32_le();
7302        __struct.min_point_x = buf.get_f32_le();
7303        __struct.min_point_y = buf.get_f32_le();
7304        __struct.stream_id = buf.get_u8();
7305        __struct.camera_device_id = buf.get_u8();
7306        Ok(__struct)
7307    }
7308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7309        let mut __tmp = BytesMut::new(bytes);
7310        #[allow(clippy::absurd_extreme_comparisons)]
7311        #[allow(unused_comparisons)]
7312        if __tmp.remaining() < Self::ENCODED_LEN {
7313            panic!(
7314                "buffer is too small (need {} bytes, but got {})",
7315                Self::ENCODED_LEN,
7316                __tmp.remaining(),
7317            )
7318        }
7319        __tmp.put_u32_le(self.time_boot_ms);
7320        __tmp.put_f32_le(self.max);
7321        __tmp.put_f32_le(self.max_point_x);
7322        __tmp.put_f32_le(self.max_point_y);
7323        __tmp.put_f32_le(self.min);
7324        __tmp.put_f32_le(self.min_point_x);
7325        __tmp.put_f32_le(self.min_point_y);
7326        __tmp.put_u8(self.stream_id);
7327        __tmp.put_u8(self.camera_device_id);
7328        if matches!(version, MavlinkVersion::V2) {
7329            let len = __tmp.len();
7330            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7331        } else {
7332            __tmp.len()
7333        }
7334    }
7335}
7336#[doc = "id: 276"]
7337#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7338#[derive(Debug, Clone, PartialEq)]
7339#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7340#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7341pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7342    #[doc = "Latitude of tracked object"]
7343    pub lat: i32,
7344    #[doc = "Longitude of tracked object"]
7345    pub lon: i32,
7346    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7347    pub alt: f32,
7348    #[doc = "Horizontal accuracy. NAN if unknown"]
7349    pub h_acc: f32,
7350    #[doc = "Vertical accuracy. NAN if unknown"]
7351    pub v_acc: f32,
7352    #[doc = "North velocity of tracked object. NAN if unknown"]
7353    pub vel_n: f32,
7354    #[doc = "East velocity of tracked object. NAN if unknown"]
7355    pub vel_e: f32,
7356    #[doc = "Down velocity of tracked object. NAN if unknown"]
7357    pub vel_d: f32,
7358    #[doc = "Velocity accuracy. NAN if unknown"]
7359    pub vel_acc: f32,
7360    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7361    pub dist: f32,
7362    #[doc = "Heading in radians, in NED. NAN if unknown"]
7363    pub hdg: f32,
7364    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7365    pub hdg_acc: f32,
7366    #[doc = "Current tracking status"]
7367    pub tracking_status: CameraTrackingStatusFlags,
7368    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7369    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7370    pub camera_device_id: u8,
7371}
7372impl CAMERA_TRACKING_GEO_STATUS_DATA {
7373    pub const ENCODED_LEN: usize = 50usize;
7374    pub const DEFAULT: Self = Self {
7375        lat: 0_i32,
7376        lon: 0_i32,
7377        alt: 0.0_f32,
7378        h_acc: 0.0_f32,
7379        v_acc: 0.0_f32,
7380        vel_n: 0.0_f32,
7381        vel_e: 0.0_f32,
7382        vel_d: 0.0_f32,
7383        vel_acc: 0.0_f32,
7384        dist: 0.0_f32,
7385        hdg: 0.0_f32,
7386        hdg_acc: 0.0_f32,
7387        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7388        camera_device_id: 0_u8,
7389    };
7390    #[cfg(feature = "arbitrary")]
7391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7392        use arbitrary::{Arbitrary, Unstructured};
7393        let mut buf = [0u8; 1024];
7394        rng.fill_bytes(&mut buf);
7395        let mut unstructured = Unstructured::new(&buf);
7396        Self::arbitrary(&mut unstructured).unwrap_or_default()
7397    }
7398}
7399impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7400    fn default() -> Self {
7401        Self::DEFAULT.clone()
7402    }
7403}
7404impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7405    type Message = MavMessage;
7406    const ID: u32 = 276u32;
7407    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7408    const EXTRA_CRC: u8 = 18u8;
7409    const ENCODED_LEN: usize = 50usize;
7410    fn deser(
7411        _version: MavlinkVersion,
7412        __input: &[u8],
7413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7414        let avail_len = __input.len();
7415        let mut payload_buf = [0; Self::ENCODED_LEN];
7416        let mut buf = if avail_len < Self::ENCODED_LEN {
7417            payload_buf[0..avail_len].copy_from_slice(__input);
7418            Bytes::new(&payload_buf)
7419        } else {
7420            Bytes::new(__input)
7421        };
7422        let mut __struct = Self::default();
7423        __struct.lat = buf.get_i32_le();
7424        __struct.lon = buf.get_i32_le();
7425        __struct.alt = buf.get_f32_le();
7426        __struct.h_acc = buf.get_f32_le();
7427        __struct.v_acc = buf.get_f32_le();
7428        __struct.vel_n = buf.get_f32_le();
7429        __struct.vel_e = buf.get_f32_le();
7430        __struct.vel_d = buf.get_f32_le();
7431        __struct.vel_acc = buf.get_f32_le();
7432        __struct.dist = buf.get_f32_le();
7433        __struct.hdg = buf.get_f32_le();
7434        __struct.hdg_acc = buf.get_f32_le();
7435        let tmp = buf.get_u8();
7436        __struct.tracking_status =
7437            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7438                enum_type: "CameraTrackingStatusFlags",
7439                value: tmp as u32,
7440            })?;
7441        __struct.camera_device_id = buf.get_u8();
7442        Ok(__struct)
7443    }
7444    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7445        let mut __tmp = BytesMut::new(bytes);
7446        #[allow(clippy::absurd_extreme_comparisons)]
7447        #[allow(unused_comparisons)]
7448        if __tmp.remaining() < Self::ENCODED_LEN {
7449            panic!(
7450                "buffer is too small (need {} bytes, but got {})",
7451                Self::ENCODED_LEN,
7452                __tmp.remaining(),
7453            )
7454        }
7455        __tmp.put_i32_le(self.lat);
7456        __tmp.put_i32_le(self.lon);
7457        __tmp.put_f32_le(self.alt);
7458        __tmp.put_f32_le(self.h_acc);
7459        __tmp.put_f32_le(self.v_acc);
7460        __tmp.put_f32_le(self.vel_n);
7461        __tmp.put_f32_le(self.vel_e);
7462        __tmp.put_f32_le(self.vel_d);
7463        __tmp.put_f32_le(self.vel_acc);
7464        __tmp.put_f32_le(self.dist);
7465        __tmp.put_f32_le(self.hdg);
7466        __tmp.put_f32_le(self.hdg_acc);
7467        __tmp.put_u8(self.tracking_status as u8);
7468        __tmp.put_u8(self.camera_device_id);
7469        if matches!(version, MavlinkVersion::V2) {
7470            let len = __tmp.len();
7471            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7472        } else {
7473            __tmp.len()
7474        }
7475    }
7476}
7477#[doc = "id: 275"]
7478#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7479#[derive(Debug, Clone, PartialEq)]
7480#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7481#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7482pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7483    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7484    pub point_x: f32,
7485    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7486    pub point_y: f32,
7487    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7488    pub radius: f32,
7489    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7490    pub rec_top_x: f32,
7491    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7492    pub rec_top_y: f32,
7493    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7494    pub rec_bottom_x: f32,
7495    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7496    pub rec_bottom_y: f32,
7497    #[doc = "Current tracking status"]
7498    pub tracking_status: CameraTrackingStatusFlags,
7499    #[doc = "Current tracking mode"]
7500    pub tracking_mode: CameraTrackingMode,
7501    #[doc = "Defines location of target data"]
7502    pub target_data: CameraTrackingTargetData,
7503    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7504    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7505    pub camera_device_id: u8,
7506}
7507impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7508    pub const ENCODED_LEN: usize = 32usize;
7509    pub const DEFAULT: Self = Self {
7510        point_x: 0.0_f32,
7511        point_y: 0.0_f32,
7512        radius: 0.0_f32,
7513        rec_top_x: 0.0_f32,
7514        rec_top_y: 0.0_f32,
7515        rec_bottom_x: 0.0_f32,
7516        rec_bottom_y: 0.0_f32,
7517        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7518        tracking_mode: CameraTrackingMode::DEFAULT,
7519        target_data: CameraTrackingTargetData::DEFAULT,
7520        camera_device_id: 0_u8,
7521    };
7522    #[cfg(feature = "arbitrary")]
7523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7524        use arbitrary::{Arbitrary, Unstructured};
7525        let mut buf = [0u8; 1024];
7526        rng.fill_bytes(&mut buf);
7527        let mut unstructured = Unstructured::new(&buf);
7528        Self::arbitrary(&mut unstructured).unwrap_or_default()
7529    }
7530}
7531impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7532    fn default() -> Self {
7533        Self::DEFAULT.clone()
7534    }
7535}
7536impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7537    type Message = MavMessage;
7538    const ID: u32 = 275u32;
7539    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7540    const EXTRA_CRC: u8 = 126u8;
7541    const ENCODED_LEN: usize = 32usize;
7542    fn deser(
7543        _version: MavlinkVersion,
7544        __input: &[u8],
7545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7546        let avail_len = __input.len();
7547        let mut payload_buf = [0; Self::ENCODED_LEN];
7548        let mut buf = if avail_len < Self::ENCODED_LEN {
7549            payload_buf[0..avail_len].copy_from_slice(__input);
7550            Bytes::new(&payload_buf)
7551        } else {
7552            Bytes::new(__input)
7553        };
7554        let mut __struct = Self::default();
7555        __struct.point_x = buf.get_f32_le();
7556        __struct.point_y = buf.get_f32_le();
7557        __struct.radius = buf.get_f32_le();
7558        __struct.rec_top_x = buf.get_f32_le();
7559        __struct.rec_top_y = buf.get_f32_le();
7560        __struct.rec_bottom_x = buf.get_f32_le();
7561        __struct.rec_bottom_y = buf.get_f32_le();
7562        let tmp = buf.get_u8();
7563        __struct.tracking_status =
7564            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7565                enum_type: "CameraTrackingStatusFlags",
7566                value: tmp as u32,
7567            })?;
7568        let tmp = buf.get_u8();
7569        __struct.tracking_mode =
7570            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7571                enum_type: "CameraTrackingMode",
7572                value: tmp as u32,
7573            })?;
7574        let tmp = buf.get_u8();
7575        __struct.target_data =
7576            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7577                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7578                    flag_type: "CameraTrackingTargetData",
7579                    value: tmp as u32,
7580                })?;
7581        __struct.camera_device_id = buf.get_u8();
7582        Ok(__struct)
7583    }
7584    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7585        let mut __tmp = BytesMut::new(bytes);
7586        #[allow(clippy::absurd_extreme_comparisons)]
7587        #[allow(unused_comparisons)]
7588        if __tmp.remaining() < Self::ENCODED_LEN {
7589            panic!(
7590                "buffer is too small (need {} bytes, but got {})",
7591                Self::ENCODED_LEN,
7592                __tmp.remaining(),
7593            )
7594        }
7595        __tmp.put_f32_le(self.point_x);
7596        __tmp.put_f32_le(self.point_y);
7597        __tmp.put_f32_le(self.radius);
7598        __tmp.put_f32_le(self.rec_top_x);
7599        __tmp.put_f32_le(self.rec_top_y);
7600        __tmp.put_f32_le(self.rec_bottom_x);
7601        __tmp.put_f32_le(self.rec_bottom_y);
7602        __tmp.put_u8(self.tracking_status as u8);
7603        __tmp.put_u8(self.tracking_mode as u8);
7604        __tmp.put_u8(self.target_data.bits());
7605        __tmp.put_u8(self.camera_device_id);
7606        if matches!(version, MavlinkVersion::V2) {
7607            let len = __tmp.len();
7608            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7609        } else {
7610            __tmp.len()
7611        }
7612    }
7613}
7614#[doc = "id: 112"]
7615#[doc = "Camera-IMU triggering and synchronisation message."]
7616#[derive(Debug, Clone, PartialEq)]
7617#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7618#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7619pub struct CAMERA_TRIGGER_DATA {
7620    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7621    pub time_usec: u64,
7622    #[doc = "Image frame sequence"]
7623    pub seq: u32,
7624}
7625impl CAMERA_TRIGGER_DATA {
7626    pub const ENCODED_LEN: usize = 12usize;
7627    pub const DEFAULT: Self = Self {
7628        time_usec: 0_u64,
7629        seq: 0_u32,
7630    };
7631    #[cfg(feature = "arbitrary")]
7632    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7633        use arbitrary::{Arbitrary, Unstructured};
7634        let mut buf = [0u8; 1024];
7635        rng.fill_bytes(&mut buf);
7636        let mut unstructured = Unstructured::new(&buf);
7637        Self::arbitrary(&mut unstructured).unwrap_or_default()
7638    }
7639}
7640impl Default for CAMERA_TRIGGER_DATA {
7641    fn default() -> Self {
7642        Self::DEFAULT.clone()
7643    }
7644}
7645impl MessageData for CAMERA_TRIGGER_DATA {
7646    type Message = MavMessage;
7647    const ID: u32 = 112u32;
7648    const NAME: &'static str = "CAMERA_TRIGGER";
7649    const EXTRA_CRC: u8 = 174u8;
7650    const ENCODED_LEN: usize = 12usize;
7651    fn deser(
7652        _version: MavlinkVersion,
7653        __input: &[u8],
7654    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7655        let avail_len = __input.len();
7656        let mut payload_buf = [0; Self::ENCODED_LEN];
7657        let mut buf = if avail_len < Self::ENCODED_LEN {
7658            payload_buf[0..avail_len].copy_from_slice(__input);
7659            Bytes::new(&payload_buf)
7660        } else {
7661            Bytes::new(__input)
7662        };
7663        let mut __struct = Self::default();
7664        __struct.time_usec = buf.get_u64_le();
7665        __struct.seq = buf.get_u32_le();
7666        Ok(__struct)
7667    }
7668    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7669        let mut __tmp = BytesMut::new(bytes);
7670        #[allow(clippy::absurd_extreme_comparisons)]
7671        #[allow(unused_comparisons)]
7672        if __tmp.remaining() < Self::ENCODED_LEN {
7673            panic!(
7674                "buffer is too small (need {} bytes, but got {})",
7675                Self::ENCODED_LEN,
7676                __tmp.remaining(),
7677            )
7678        }
7679        __tmp.put_u64_le(self.time_usec);
7680        __tmp.put_u32_le(self.seq);
7681        if matches!(version, MavlinkVersion::V2) {
7682            let len = __tmp.len();
7683            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7684        } else {
7685            __tmp.len()
7686        }
7687    }
7688}
7689#[doc = "id: 387"]
7690#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
7691#[derive(Debug, Clone, PartialEq)]
7692#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7693#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7694pub struct CANFD_FRAME_DATA {
7695    #[doc = "Frame ID"]
7696    pub id: u32,
7697    #[doc = "System ID."]
7698    pub target_system: u8,
7699    #[doc = "Component ID."]
7700    pub target_component: u8,
7701    #[doc = "bus number"]
7702    pub bus: u8,
7703    #[doc = "Frame length"]
7704    pub len: u8,
7705    #[doc = "Frame data"]
7706    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7707    pub data: [u8; 64],
7708}
7709impl CANFD_FRAME_DATA {
7710    pub const ENCODED_LEN: usize = 72usize;
7711    pub const DEFAULT: Self = Self {
7712        id: 0_u32,
7713        target_system: 0_u8,
7714        target_component: 0_u8,
7715        bus: 0_u8,
7716        len: 0_u8,
7717        data: [0_u8; 64usize],
7718    };
7719    #[cfg(feature = "arbitrary")]
7720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7721        use arbitrary::{Arbitrary, Unstructured};
7722        let mut buf = [0u8; 1024];
7723        rng.fill_bytes(&mut buf);
7724        let mut unstructured = Unstructured::new(&buf);
7725        Self::arbitrary(&mut unstructured).unwrap_or_default()
7726    }
7727}
7728impl Default for CANFD_FRAME_DATA {
7729    fn default() -> Self {
7730        Self::DEFAULT.clone()
7731    }
7732}
7733impl MessageData for CANFD_FRAME_DATA {
7734    type Message = MavMessage;
7735    const ID: u32 = 387u32;
7736    const NAME: &'static str = "CANFD_FRAME";
7737    const EXTRA_CRC: u8 = 4u8;
7738    const ENCODED_LEN: usize = 72usize;
7739    fn deser(
7740        _version: MavlinkVersion,
7741        __input: &[u8],
7742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7743        let avail_len = __input.len();
7744        let mut payload_buf = [0; Self::ENCODED_LEN];
7745        let mut buf = if avail_len < Self::ENCODED_LEN {
7746            payload_buf[0..avail_len].copy_from_slice(__input);
7747            Bytes::new(&payload_buf)
7748        } else {
7749            Bytes::new(__input)
7750        };
7751        let mut __struct = Self::default();
7752        __struct.id = buf.get_u32_le();
7753        __struct.target_system = buf.get_u8();
7754        __struct.target_component = buf.get_u8();
7755        __struct.bus = buf.get_u8();
7756        __struct.len = buf.get_u8();
7757        for v in &mut __struct.data {
7758            let val = buf.get_u8();
7759            *v = val;
7760        }
7761        Ok(__struct)
7762    }
7763    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7764        let mut __tmp = BytesMut::new(bytes);
7765        #[allow(clippy::absurd_extreme_comparisons)]
7766        #[allow(unused_comparisons)]
7767        if __tmp.remaining() < Self::ENCODED_LEN {
7768            panic!(
7769                "buffer is too small (need {} bytes, but got {})",
7770                Self::ENCODED_LEN,
7771                __tmp.remaining(),
7772            )
7773        }
7774        __tmp.put_u32_le(self.id);
7775        __tmp.put_u8(self.target_system);
7776        __tmp.put_u8(self.target_component);
7777        __tmp.put_u8(self.bus);
7778        __tmp.put_u8(self.len);
7779        for val in &self.data {
7780            __tmp.put_u8(*val);
7781        }
7782        if matches!(version, MavlinkVersion::V2) {
7783            let len = __tmp.len();
7784            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7785        } else {
7786            __tmp.len()
7787        }
7788    }
7789}
7790#[doc = "id: 388"]
7791#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
7792#[derive(Debug, Clone, PartialEq)]
7793#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7794#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7795pub struct CAN_FILTER_MODIFY_DATA {
7796    #[doc = "filter IDs, length num_ids"]
7797    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7798    pub ids: [u16; 16],
7799    #[doc = "System ID."]
7800    pub target_system: u8,
7801    #[doc = "Component ID."]
7802    pub target_component: u8,
7803    #[doc = "bus number"]
7804    pub bus: u8,
7805    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
7806    pub operation: CanFilterOp,
7807    #[doc = "number of IDs in filter list"]
7808    pub num_ids: u8,
7809}
7810impl CAN_FILTER_MODIFY_DATA {
7811    pub const ENCODED_LEN: usize = 37usize;
7812    pub const DEFAULT: Self = Self {
7813        ids: [0_u16; 16usize],
7814        target_system: 0_u8,
7815        target_component: 0_u8,
7816        bus: 0_u8,
7817        operation: CanFilterOp::DEFAULT,
7818        num_ids: 0_u8,
7819    };
7820    #[cfg(feature = "arbitrary")]
7821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7822        use arbitrary::{Arbitrary, Unstructured};
7823        let mut buf = [0u8; 1024];
7824        rng.fill_bytes(&mut buf);
7825        let mut unstructured = Unstructured::new(&buf);
7826        Self::arbitrary(&mut unstructured).unwrap_or_default()
7827    }
7828}
7829impl Default for CAN_FILTER_MODIFY_DATA {
7830    fn default() -> Self {
7831        Self::DEFAULT.clone()
7832    }
7833}
7834impl MessageData for CAN_FILTER_MODIFY_DATA {
7835    type Message = MavMessage;
7836    const ID: u32 = 388u32;
7837    const NAME: &'static str = "CAN_FILTER_MODIFY";
7838    const EXTRA_CRC: u8 = 8u8;
7839    const ENCODED_LEN: usize = 37usize;
7840    fn deser(
7841        _version: MavlinkVersion,
7842        __input: &[u8],
7843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7844        let avail_len = __input.len();
7845        let mut payload_buf = [0; Self::ENCODED_LEN];
7846        let mut buf = if avail_len < Self::ENCODED_LEN {
7847            payload_buf[0..avail_len].copy_from_slice(__input);
7848            Bytes::new(&payload_buf)
7849        } else {
7850            Bytes::new(__input)
7851        };
7852        let mut __struct = Self::default();
7853        for v in &mut __struct.ids {
7854            let val = buf.get_u16_le();
7855            *v = val;
7856        }
7857        __struct.target_system = buf.get_u8();
7858        __struct.target_component = buf.get_u8();
7859        __struct.bus = buf.get_u8();
7860        let tmp = buf.get_u8();
7861        __struct.operation =
7862            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7863                enum_type: "CanFilterOp",
7864                value: tmp as u32,
7865            })?;
7866        __struct.num_ids = buf.get_u8();
7867        Ok(__struct)
7868    }
7869    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7870        let mut __tmp = BytesMut::new(bytes);
7871        #[allow(clippy::absurd_extreme_comparisons)]
7872        #[allow(unused_comparisons)]
7873        if __tmp.remaining() < Self::ENCODED_LEN {
7874            panic!(
7875                "buffer is too small (need {} bytes, but got {})",
7876                Self::ENCODED_LEN,
7877                __tmp.remaining(),
7878            )
7879        }
7880        for val in &self.ids {
7881            __tmp.put_u16_le(*val);
7882        }
7883        __tmp.put_u8(self.target_system);
7884        __tmp.put_u8(self.target_component);
7885        __tmp.put_u8(self.bus);
7886        __tmp.put_u8(self.operation as u8);
7887        __tmp.put_u8(self.num_ids);
7888        if matches!(version, MavlinkVersion::V2) {
7889            let len = __tmp.len();
7890            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7891        } else {
7892            __tmp.len()
7893        }
7894    }
7895}
7896#[doc = "id: 386"]
7897#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
7898#[derive(Debug, Clone, PartialEq)]
7899#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7900#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7901pub struct CAN_FRAME_DATA {
7902    #[doc = "Frame ID"]
7903    pub id: u32,
7904    #[doc = "System ID."]
7905    pub target_system: u8,
7906    #[doc = "Component ID."]
7907    pub target_component: u8,
7908    #[doc = "Bus number"]
7909    pub bus: u8,
7910    #[doc = "Frame length"]
7911    pub len: u8,
7912    #[doc = "Frame data"]
7913    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7914    pub data: [u8; 8],
7915}
7916impl CAN_FRAME_DATA {
7917    pub const ENCODED_LEN: usize = 16usize;
7918    pub const DEFAULT: Self = Self {
7919        id: 0_u32,
7920        target_system: 0_u8,
7921        target_component: 0_u8,
7922        bus: 0_u8,
7923        len: 0_u8,
7924        data: [0_u8; 8usize],
7925    };
7926    #[cfg(feature = "arbitrary")]
7927    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7928        use arbitrary::{Arbitrary, Unstructured};
7929        let mut buf = [0u8; 1024];
7930        rng.fill_bytes(&mut buf);
7931        let mut unstructured = Unstructured::new(&buf);
7932        Self::arbitrary(&mut unstructured).unwrap_or_default()
7933    }
7934}
7935impl Default for CAN_FRAME_DATA {
7936    fn default() -> Self {
7937        Self::DEFAULT.clone()
7938    }
7939}
7940impl MessageData for CAN_FRAME_DATA {
7941    type Message = MavMessage;
7942    const ID: u32 = 386u32;
7943    const NAME: &'static str = "CAN_FRAME";
7944    const EXTRA_CRC: u8 = 132u8;
7945    const ENCODED_LEN: usize = 16usize;
7946    fn deser(
7947        _version: MavlinkVersion,
7948        __input: &[u8],
7949    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7950        let avail_len = __input.len();
7951        let mut payload_buf = [0; Self::ENCODED_LEN];
7952        let mut buf = if avail_len < Self::ENCODED_LEN {
7953            payload_buf[0..avail_len].copy_from_slice(__input);
7954            Bytes::new(&payload_buf)
7955        } else {
7956            Bytes::new(__input)
7957        };
7958        let mut __struct = Self::default();
7959        __struct.id = buf.get_u32_le();
7960        __struct.target_system = buf.get_u8();
7961        __struct.target_component = buf.get_u8();
7962        __struct.bus = buf.get_u8();
7963        __struct.len = buf.get_u8();
7964        for v in &mut __struct.data {
7965            let val = buf.get_u8();
7966            *v = val;
7967        }
7968        Ok(__struct)
7969    }
7970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7971        let mut __tmp = BytesMut::new(bytes);
7972        #[allow(clippy::absurd_extreme_comparisons)]
7973        #[allow(unused_comparisons)]
7974        if __tmp.remaining() < Self::ENCODED_LEN {
7975            panic!(
7976                "buffer is too small (need {} bytes, but got {})",
7977                Self::ENCODED_LEN,
7978                __tmp.remaining(),
7979            )
7980        }
7981        __tmp.put_u32_le(self.id);
7982        __tmp.put_u8(self.target_system);
7983        __tmp.put_u8(self.target_component);
7984        __tmp.put_u8(self.bus);
7985        __tmp.put_u8(self.len);
7986        for val in &self.data {
7987            __tmp.put_u8(*val);
7988        }
7989        if matches!(version, MavlinkVersion::V2) {
7990            let len = __tmp.len();
7991            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7992        } else {
7993            __tmp.len()
7994        }
7995    }
7996}
7997#[doc = "id: 336"]
7998#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
7999#[derive(Debug, Clone, PartialEq)]
8000#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8001#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8002pub struct CELLULAR_CONFIG_DATA {
8003    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8004    pub enable_lte: u8,
8005    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8006    pub enable_pin: u8,
8007    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8008    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8009    pub pin: [u8; 16],
8010    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8011    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8012    pub new_pin: [u8; 16],
8013    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8014    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8015    pub apn: [u8; 32],
8016    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8017    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8018    pub puk: [u8; 16],
8019    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8020    pub roaming: u8,
8021    #[doc = "Message acceptance response (sent back to GS)."]
8022    pub response: CellularConfigResponse,
8023}
8024impl CELLULAR_CONFIG_DATA {
8025    pub const ENCODED_LEN: usize = 84usize;
8026    pub const DEFAULT: Self = Self {
8027        enable_lte: 0_u8,
8028        enable_pin: 0_u8,
8029        pin: [0_u8; 16usize],
8030        new_pin: [0_u8; 16usize],
8031        apn: [0_u8; 32usize],
8032        puk: [0_u8; 16usize],
8033        roaming: 0_u8,
8034        response: CellularConfigResponse::DEFAULT,
8035    };
8036    #[cfg(feature = "arbitrary")]
8037    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8038        use arbitrary::{Arbitrary, Unstructured};
8039        let mut buf = [0u8; 1024];
8040        rng.fill_bytes(&mut buf);
8041        let mut unstructured = Unstructured::new(&buf);
8042        Self::arbitrary(&mut unstructured).unwrap_or_default()
8043    }
8044}
8045impl Default for CELLULAR_CONFIG_DATA {
8046    fn default() -> Self {
8047        Self::DEFAULT.clone()
8048    }
8049}
8050impl MessageData for CELLULAR_CONFIG_DATA {
8051    type Message = MavMessage;
8052    const ID: u32 = 336u32;
8053    const NAME: &'static str = "CELLULAR_CONFIG";
8054    const EXTRA_CRC: u8 = 245u8;
8055    const ENCODED_LEN: usize = 84usize;
8056    fn deser(
8057        _version: MavlinkVersion,
8058        __input: &[u8],
8059    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8060        let avail_len = __input.len();
8061        let mut payload_buf = [0; Self::ENCODED_LEN];
8062        let mut buf = if avail_len < Self::ENCODED_LEN {
8063            payload_buf[0..avail_len].copy_from_slice(__input);
8064            Bytes::new(&payload_buf)
8065        } else {
8066            Bytes::new(__input)
8067        };
8068        let mut __struct = Self::default();
8069        __struct.enable_lte = buf.get_u8();
8070        __struct.enable_pin = buf.get_u8();
8071        for v in &mut __struct.pin {
8072            let val = buf.get_u8();
8073            *v = val;
8074        }
8075        for v in &mut __struct.new_pin {
8076            let val = buf.get_u8();
8077            *v = val;
8078        }
8079        for v in &mut __struct.apn {
8080            let val = buf.get_u8();
8081            *v = val;
8082        }
8083        for v in &mut __struct.puk {
8084            let val = buf.get_u8();
8085            *v = val;
8086        }
8087        __struct.roaming = buf.get_u8();
8088        let tmp = buf.get_u8();
8089        __struct.response =
8090            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8091                enum_type: "CellularConfigResponse",
8092                value: tmp as u32,
8093            })?;
8094        Ok(__struct)
8095    }
8096    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8097        let mut __tmp = BytesMut::new(bytes);
8098        #[allow(clippy::absurd_extreme_comparisons)]
8099        #[allow(unused_comparisons)]
8100        if __tmp.remaining() < Self::ENCODED_LEN {
8101            panic!(
8102                "buffer is too small (need {} bytes, but got {})",
8103                Self::ENCODED_LEN,
8104                __tmp.remaining(),
8105            )
8106        }
8107        __tmp.put_u8(self.enable_lte);
8108        __tmp.put_u8(self.enable_pin);
8109        for val in &self.pin {
8110            __tmp.put_u8(*val);
8111        }
8112        for val in &self.new_pin {
8113            __tmp.put_u8(*val);
8114        }
8115        for val in &self.apn {
8116            __tmp.put_u8(*val);
8117        }
8118        for val in &self.puk {
8119            __tmp.put_u8(*val);
8120        }
8121        __tmp.put_u8(self.roaming);
8122        __tmp.put_u8(self.response as u8);
8123        if matches!(version, MavlinkVersion::V2) {
8124            let len = __tmp.len();
8125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8126        } else {
8127            __tmp.len()
8128        }
8129    }
8130}
8131#[doc = "id: 334"]
8132#[doc = "Report current used cellular network status."]
8133#[derive(Debug, Clone, PartialEq)]
8134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8136pub struct CELLULAR_STATUS_DATA {
8137    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8138    pub mcc: u16,
8139    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8140    pub mnc: u16,
8141    #[doc = "Location area code. If unknown, set to 0"]
8142    pub lac: u16,
8143    #[doc = "Cellular modem status"]
8144    pub status: CellularStatusFlag,
8145    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8146    pub failure_reason: CellularNetworkFailedReason,
8147    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8148    pub mavtype: CellularNetworkRadioType,
8149    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8150    pub quality: u8,
8151}
8152impl CELLULAR_STATUS_DATA {
8153    pub const ENCODED_LEN: usize = 10usize;
8154    pub const DEFAULT: Self = Self {
8155        mcc: 0_u16,
8156        mnc: 0_u16,
8157        lac: 0_u16,
8158        status: CellularStatusFlag::DEFAULT,
8159        failure_reason: CellularNetworkFailedReason::DEFAULT,
8160        mavtype: CellularNetworkRadioType::DEFAULT,
8161        quality: 0_u8,
8162    };
8163    #[cfg(feature = "arbitrary")]
8164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8165        use arbitrary::{Arbitrary, Unstructured};
8166        let mut buf = [0u8; 1024];
8167        rng.fill_bytes(&mut buf);
8168        let mut unstructured = Unstructured::new(&buf);
8169        Self::arbitrary(&mut unstructured).unwrap_or_default()
8170    }
8171}
8172impl Default for CELLULAR_STATUS_DATA {
8173    fn default() -> Self {
8174        Self::DEFAULT.clone()
8175    }
8176}
8177impl MessageData for CELLULAR_STATUS_DATA {
8178    type Message = MavMessage;
8179    const ID: u32 = 334u32;
8180    const NAME: &'static str = "CELLULAR_STATUS";
8181    const EXTRA_CRC: u8 = 72u8;
8182    const ENCODED_LEN: usize = 10usize;
8183    fn deser(
8184        _version: MavlinkVersion,
8185        __input: &[u8],
8186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8187        let avail_len = __input.len();
8188        let mut payload_buf = [0; Self::ENCODED_LEN];
8189        let mut buf = if avail_len < Self::ENCODED_LEN {
8190            payload_buf[0..avail_len].copy_from_slice(__input);
8191            Bytes::new(&payload_buf)
8192        } else {
8193            Bytes::new(__input)
8194        };
8195        let mut __struct = Self::default();
8196        __struct.mcc = buf.get_u16_le();
8197        __struct.mnc = buf.get_u16_le();
8198        __struct.lac = buf.get_u16_le();
8199        let tmp = buf.get_u8();
8200        __struct.status =
8201            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8202                enum_type: "CellularStatusFlag",
8203                value: tmp as u32,
8204            })?;
8205        let tmp = buf.get_u8();
8206        __struct.failure_reason =
8207            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8208                enum_type: "CellularNetworkFailedReason",
8209                value: tmp as u32,
8210            })?;
8211        let tmp = buf.get_u8();
8212        __struct.mavtype =
8213            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8214                enum_type: "CellularNetworkRadioType",
8215                value: tmp as u32,
8216            })?;
8217        __struct.quality = buf.get_u8();
8218        Ok(__struct)
8219    }
8220    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8221        let mut __tmp = BytesMut::new(bytes);
8222        #[allow(clippy::absurd_extreme_comparisons)]
8223        #[allow(unused_comparisons)]
8224        if __tmp.remaining() < Self::ENCODED_LEN {
8225            panic!(
8226                "buffer is too small (need {} bytes, but got {})",
8227                Self::ENCODED_LEN,
8228                __tmp.remaining(),
8229            )
8230        }
8231        __tmp.put_u16_le(self.mcc);
8232        __tmp.put_u16_le(self.mnc);
8233        __tmp.put_u16_le(self.lac);
8234        __tmp.put_u8(self.status as u8);
8235        __tmp.put_u8(self.failure_reason as u8);
8236        __tmp.put_u8(self.mavtype as u8);
8237        __tmp.put_u8(self.quality);
8238        if matches!(version, MavlinkVersion::V2) {
8239            let len = __tmp.len();
8240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8241        } else {
8242            __tmp.len()
8243        }
8244    }
8245}
8246#[doc = "id: 5"]
8247#[doc = "Request to control this MAV."]
8248#[derive(Debug, Clone, PartialEq)]
8249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8251pub struct CHANGE_OPERATOR_CONTROL_DATA {
8252    #[doc = "System the GCS requests control for"]
8253    pub target_system: u8,
8254    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8255    pub control_request: u8,
8256    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8257    pub version: u8,
8258    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8259    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8260    pub passkey: [u8; 25],
8261}
8262impl CHANGE_OPERATOR_CONTROL_DATA {
8263    pub const ENCODED_LEN: usize = 28usize;
8264    pub const DEFAULT: Self = Self {
8265        target_system: 0_u8,
8266        control_request: 0_u8,
8267        version: 0_u8,
8268        passkey: [0_u8; 25usize],
8269    };
8270    #[cfg(feature = "arbitrary")]
8271    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8272        use arbitrary::{Arbitrary, Unstructured};
8273        let mut buf = [0u8; 1024];
8274        rng.fill_bytes(&mut buf);
8275        let mut unstructured = Unstructured::new(&buf);
8276        Self::arbitrary(&mut unstructured).unwrap_or_default()
8277    }
8278}
8279impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8280    fn default() -> Self {
8281        Self::DEFAULT.clone()
8282    }
8283}
8284impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8285    type Message = MavMessage;
8286    const ID: u32 = 5u32;
8287    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8288    const EXTRA_CRC: u8 = 217u8;
8289    const ENCODED_LEN: usize = 28usize;
8290    fn deser(
8291        _version: MavlinkVersion,
8292        __input: &[u8],
8293    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8294        let avail_len = __input.len();
8295        let mut payload_buf = [0; Self::ENCODED_LEN];
8296        let mut buf = if avail_len < Self::ENCODED_LEN {
8297            payload_buf[0..avail_len].copy_from_slice(__input);
8298            Bytes::new(&payload_buf)
8299        } else {
8300            Bytes::new(__input)
8301        };
8302        let mut __struct = Self::default();
8303        __struct.target_system = buf.get_u8();
8304        __struct.control_request = buf.get_u8();
8305        __struct.version = buf.get_u8();
8306        for v in &mut __struct.passkey {
8307            let val = buf.get_u8();
8308            *v = val;
8309        }
8310        Ok(__struct)
8311    }
8312    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8313        let mut __tmp = BytesMut::new(bytes);
8314        #[allow(clippy::absurd_extreme_comparisons)]
8315        #[allow(unused_comparisons)]
8316        if __tmp.remaining() < Self::ENCODED_LEN {
8317            panic!(
8318                "buffer is too small (need {} bytes, but got {})",
8319                Self::ENCODED_LEN,
8320                __tmp.remaining(),
8321            )
8322        }
8323        __tmp.put_u8(self.target_system);
8324        __tmp.put_u8(self.control_request);
8325        __tmp.put_u8(self.version);
8326        for val in &self.passkey {
8327            __tmp.put_u8(*val);
8328        }
8329        if matches!(version, MavlinkVersion::V2) {
8330            let len = __tmp.len();
8331            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8332        } else {
8333            __tmp.len()
8334        }
8335    }
8336}
8337#[doc = "id: 6"]
8338#[doc = "Accept / deny control of this MAV."]
8339#[derive(Debug, Clone, PartialEq)]
8340#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8341#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8342pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8343    #[doc = "ID of the GCS this message"]
8344    pub gcs_system_id: u8,
8345    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8346    pub control_request: u8,
8347    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8348    pub ack: u8,
8349}
8350impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8351    pub const ENCODED_LEN: usize = 3usize;
8352    pub const DEFAULT: Self = Self {
8353        gcs_system_id: 0_u8,
8354        control_request: 0_u8,
8355        ack: 0_u8,
8356    };
8357    #[cfg(feature = "arbitrary")]
8358    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8359        use arbitrary::{Arbitrary, Unstructured};
8360        let mut buf = [0u8; 1024];
8361        rng.fill_bytes(&mut buf);
8362        let mut unstructured = Unstructured::new(&buf);
8363        Self::arbitrary(&mut unstructured).unwrap_or_default()
8364    }
8365}
8366impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8367    fn default() -> Self {
8368        Self::DEFAULT.clone()
8369    }
8370}
8371impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8372    type Message = MavMessage;
8373    const ID: u32 = 6u32;
8374    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8375    const EXTRA_CRC: u8 = 104u8;
8376    const ENCODED_LEN: usize = 3usize;
8377    fn deser(
8378        _version: MavlinkVersion,
8379        __input: &[u8],
8380    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8381        let avail_len = __input.len();
8382        let mut payload_buf = [0; Self::ENCODED_LEN];
8383        let mut buf = if avail_len < Self::ENCODED_LEN {
8384            payload_buf[0..avail_len].copy_from_slice(__input);
8385            Bytes::new(&payload_buf)
8386        } else {
8387            Bytes::new(__input)
8388        };
8389        let mut __struct = Self::default();
8390        __struct.gcs_system_id = buf.get_u8();
8391        __struct.control_request = buf.get_u8();
8392        __struct.ack = buf.get_u8();
8393        Ok(__struct)
8394    }
8395    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8396        let mut __tmp = BytesMut::new(bytes);
8397        #[allow(clippy::absurd_extreme_comparisons)]
8398        #[allow(unused_comparisons)]
8399        if __tmp.remaining() < Self::ENCODED_LEN {
8400            panic!(
8401                "buffer is too small (need {} bytes, but got {})",
8402                Self::ENCODED_LEN,
8403                __tmp.remaining(),
8404            )
8405        }
8406        __tmp.put_u8(self.gcs_system_id);
8407        __tmp.put_u8(self.control_request);
8408        __tmp.put_u8(self.ack);
8409        if matches!(version, MavlinkVersion::V2) {
8410            let len = __tmp.len();
8411            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8412        } else {
8413            __tmp.len()
8414        }
8415    }
8416}
8417#[doc = "id: 247"]
8418#[doc = "Information about a potential collision."]
8419#[derive(Debug, Clone, PartialEq)]
8420#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8421#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8422pub struct COLLISION_DATA {
8423    #[doc = "Unique identifier, domain based on src field"]
8424    pub id: u32,
8425    #[doc = "Estimated time until collision occurs"]
8426    pub time_to_minimum_delta: f32,
8427    #[doc = "Closest vertical distance between vehicle and object"]
8428    pub altitude_minimum_delta: f32,
8429    #[doc = "Closest horizontal distance between vehicle and object"]
8430    pub horizontal_minimum_delta: f32,
8431    #[doc = "Collision data source"]
8432    pub src: MavCollisionSrc,
8433    #[doc = "Action that is being taken to avoid this collision"]
8434    pub action: MavCollisionAction,
8435    #[doc = "How concerned the aircraft is about this collision"]
8436    pub threat_level: MavCollisionThreatLevel,
8437}
8438impl COLLISION_DATA {
8439    pub const ENCODED_LEN: usize = 19usize;
8440    pub const DEFAULT: Self = Self {
8441        id: 0_u32,
8442        time_to_minimum_delta: 0.0_f32,
8443        altitude_minimum_delta: 0.0_f32,
8444        horizontal_minimum_delta: 0.0_f32,
8445        src: MavCollisionSrc::DEFAULT,
8446        action: MavCollisionAction::DEFAULT,
8447        threat_level: MavCollisionThreatLevel::DEFAULT,
8448    };
8449    #[cfg(feature = "arbitrary")]
8450    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8451        use arbitrary::{Arbitrary, Unstructured};
8452        let mut buf = [0u8; 1024];
8453        rng.fill_bytes(&mut buf);
8454        let mut unstructured = Unstructured::new(&buf);
8455        Self::arbitrary(&mut unstructured).unwrap_or_default()
8456    }
8457}
8458impl Default for COLLISION_DATA {
8459    fn default() -> Self {
8460        Self::DEFAULT.clone()
8461    }
8462}
8463impl MessageData for COLLISION_DATA {
8464    type Message = MavMessage;
8465    const ID: u32 = 247u32;
8466    const NAME: &'static str = "COLLISION";
8467    const EXTRA_CRC: u8 = 81u8;
8468    const ENCODED_LEN: usize = 19usize;
8469    fn deser(
8470        _version: MavlinkVersion,
8471        __input: &[u8],
8472    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8473        let avail_len = __input.len();
8474        let mut payload_buf = [0; Self::ENCODED_LEN];
8475        let mut buf = if avail_len < Self::ENCODED_LEN {
8476            payload_buf[0..avail_len].copy_from_slice(__input);
8477            Bytes::new(&payload_buf)
8478        } else {
8479            Bytes::new(__input)
8480        };
8481        let mut __struct = Self::default();
8482        __struct.id = buf.get_u32_le();
8483        __struct.time_to_minimum_delta = buf.get_f32_le();
8484        __struct.altitude_minimum_delta = buf.get_f32_le();
8485        __struct.horizontal_minimum_delta = buf.get_f32_le();
8486        let tmp = buf.get_u8();
8487        __struct.src =
8488            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8489                enum_type: "MavCollisionSrc",
8490                value: tmp as u32,
8491            })?;
8492        let tmp = buf.get_u8();
8493        __struct.action =
8494            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8495                enum_type: "MavCollisionAction",
8496                value: tmp as u32,
8497            })?;
8498        let tmp = buf.get_u8();
8499        __struct.threat_level =
8500            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8501                enum_type: "MavCollisionThreatLevel",
8502                value: tmp as u32,
8503            })?;
8504        Ok(__struct)
8505    }
8506    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8507        let mut __tmp = BytesMut::new(bytes);
8508        #[allow(clippy::absurd_extreme_comparisons)]
8509        #[allow(unused_comparisons)]
8510        if __tmp.remaining() < Self::ENCODED_LEN {
8511            panic!(
8512                "buffer is too small (need {} bytes, but got {})",
8513                Self::ENCODED_LEN,
8514                __tmp.remaining(),
8515            )
8516        }
8517        __tmp.put_u32_le(self.id);
8518        __tmp.put_f32_le(self.time_to_minimum_delta);
8519        __tmp.put_f32_le(self.altitude_minimum_delta);
8520        __tmp.put_f32_le(self.horizontal_minimum_delta);
8521        __tmp.put_u8(self.src as u8);
8522        __tmp.put_u8(self.action as u8);
8523        __tmp.put_u8(self.threat_level as u8);
8524        if matches!(version, MavlinkVersion::V2) {
8525            let len = __tmp.len();
8526            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8527        } else {
8528            __tmp.len()
8529        }
8530    }
8531}
8532#[doc = "id: 77"]
8533#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8534#[derive(Debug, Clone, PartialEq)]
8535#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8536#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8537pub struct COMMAND_ACK_DATA {
8538    #[doc = "Command ID (of acknowledged command)."]
8539    pub command: MavCmd,
8540    #[doc = "Result of command."]
8541    pub result: MavResult,
8542    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8543    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8544    pub progress: u8,
8545    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8546    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8547    pub result_param2: i32,
8548    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8549    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8550    pub target_system: u8,
8551    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8552    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8553    pub target_component: u8,
8554}
8555impl COMMAND_ACK_DATA {
8556    pub const ENCODED_LEN: usize = 10usize;
8557    pub const DEFAULT: Self = Self {
8558        command: MavCmd::DEFAULT,
8559        result: MavResult::DEFAULT,
8560        progress: 0_u8,
8561        result_param2: 0_i32,
8562        target_system: 0_u8,
8563        target_component: 0_u8,
8564    };
8565    #[cfg(feature = "arbitrary")]
8566    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8567        use arbitrary::{Arbitrary, Unstructured};
8568        let mut buf = [0u8; 1024];
8569        rng.fill_bytes(&mut buf);
8570        let mut unstructured = Unstructured::new(&buf);
8571        Self::arbitrary(&mut unstructured).unwrap_or_default()
8572    }
8573}
8574impl Default for COMMAND_ACK_DATA {
8575    fn default() -> Self {
8576        Self::DEFAULT.clone()
8577    }
8578}
8579impl MessageData for COMMAND_ACK_DATA {
8580    type Message = MavMessage;
8581    const ID: u32 = 77u32;
8582    const NAME: &'static str = "COMMAND_ACK";
8583    const EXTRA_CRC: u8 = 143u8;
8584    const ENCODED_LEN: usize = 10usize;
8585    fn deser(
8586        _version: MavlinkVersion,
8587        __input: &[u8],
8588    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8589        let avail_len = __input.len();
8590        let mut payload_buf = [0; Self::ENCODED_LEN];
8591        let mut buf = if avail_len < Self::ENCODED_LEN {
8592            payload_buf[0..avail_len].copy_from_slice(__input);
8593            Bytes::new(&payload_buf)
8594        } else {
8595            Bytes::new(__input)
8596        };
8597        let mut __struct = Self::default();
8598        let tmp = buf.get_u16_le();
8599        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8600            ::mavlink_core::error::ParserError::InvalidEnum {
8601                enum_type: "MavCmd",
8602                value: tmp as u32,
8603            },
8604        )?;
8605        let tmp = buf.get_u8();
8606        __struct.result =
8607            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8608                enum_type: "MavResult",
8609                value: tmp as u32,
8610            })?;
8611        __struct.progress = buf.get_u8();
8612        __struct.result_param2 = buf.get_i32_le();
8613        __struct.target_system = buf.get_u8();
8614        __struct.target_component = buf.get_u8();
8615        Ok(__struct)
8616    }
8617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8618        let mut __tmp = BytesMut::new(bytes);
8619        #[allow(clippy::absurd_extreme_comparisons)]
8620        #[allow(unused_comparisons)]
8621        if __tmp.remaining() < Self::ENCODED_LEN {
8622            panic!(
8623                "buffer is too small (need {} bytes, but got {})",
8624                Self::ENCODED_LEN,
8625                __tmp.remaining(),
8626            )
8627        }
8628        __tmp.put_u16_le(self.command as u16);
8629        __tmp.put_u8(self.result as u8);
8630        __tmp.put_u8(self.progress);
8631        __tmp.put_i32_le(self.result_param2);
8632        __tmp.put_u8(self.target_system);
8633        __tmp.put_u8(self.target_component);
8634        if matches!(version, MavlinkVersion::V2) {
8635            let len = __tmp.len();
8636            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8637        } else {
8638            __tmp.len()
8639        }
8640    }
8641}
8642#[doc = "id: 80"]
8643#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8644#[derive(Debug, Clone, PartialEq)]
8645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8647pub struct COMMAND_CANCEL_DATA {
8648    #[doc = "Command ID (of command to cancel)."]
8649    pub command: MavCmd,
8650    #[doc = "System executing long running command. Should not be broadcast (0)."]
8651    pub target_system: u8,
8652    #[doc = "Component executing long running command."]
8653    pub target_component: u8,
8654}
8655impl COMMAND_CANCEL_DATA {
8656    pub const ENCODED_LEN: usize = 4usize;
8657    pub const DEFAULT: Self = Self {
8658        command: MavCmd::DEFAULT,
8659        target_system: 0_u8,
8660        target_component: 0_u8,
8661    };
8662    #[cfg(feature = "arbitrary")]
8663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8664        use arbitrary::{Arbitrary, Unstructured};
8665        let mut buf = [0u8; 1024];
8666        rng.fill_bytes(&mut buf);
8667        let mut unstructured = Unstructured::new(&buf);
8668        Self::arbitrary(&mut unstructured).unwrap_or_default()
8669    }
8670}
8671impl Default for COMMAND_CANCEL_DATA {
8672    fn default() -> Self {
8673        Self::DEFAULT.clone()
8674    }
8675}
8676impl MessageData for COMMAND_CANCEL_DATA {
8677    type Message = MavMessage;
8678    const ID: u32 = 80u32;
8679    const NAME: &'static str = "COMMAND_CANCEL";
8680    const EXTRA_CRC: u8 = 14u8;
8681    const ENCODED_LEN: usize = 4usize;
8682    fn deser(
8683        _version: MavlinkVersion,
8684        __input: &[u8],
8685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8686        let avail_len = __input.len();
8687        let mut payload_buf = [0; Self::ENCODED_LEN];
8688        let mut buf = if avail_len < Self::ENCODED_LEN {
8689            payload_buf[0..avail_len].copy_from_slice(__input);
8690            Bytes::new(&payload_buf)
8691        } else {
8692            Bytes::new(__input)
8693        };
8694        let mut __struct = Self::default();
8695        let tmp = buf.get_u16_le();
8696        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8697            ::mavlink_core::error::ParserError::InvalidEnum {
8698                enum_type: "MavCmd",
8699                value: tmp as u32,
8700            },
8701        )?;
8702        __struct.target_system = buf.get_u8();
8703        __struct.target_component = buf.get_u8();
8704        Ok(__struct)
8705    }
8706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8707        let mut __tmp = BytesMut::new(bytes);
8708        #[allow(clippy::absurd_extreme_comparisons)]
8709        #[allow(unused_comparisons)]
8710        if __tmp.remaining() < Self::ENCODED_LEN {
8711            panic!(
8712                "buffer is too small (need {} bytes, but got {})",
8713                Self::ENCODED_LEN,
8714                __tmp.remaining(),
8715            )
8716        }
8717        __tmp.put_u16_le(self.command as u16);
8718        __tmp.put_u8(self.target_system);
8719        __tmp.put_u8(self.target_component);
8720        if matches!(version, MavlinkVersion::V2) {
8721            let len = __tmp.len();
8722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8723        } else {
8724            __tmp.len()
8725        }
8726    }
8727}
8728#[doc = "id: 75"]
8729#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8730#[derive(Debug, Clone, PartialEq)]
8731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8733pub struct COMMAND_INT_DATA {
8734    #[doc = "PARAM1, see MAV_CMD enum"]
8735    pub param1: f32,
8736    #[doc = "PARAM2, see MAV_CMD enum"]
8737    pub param2: f32,
8738    #[doc = "PARAM3, see MAV_CMD enum"]
8739    pub param3: f32,
8740    #[doc = "PARAM4, see MAV_CMD enum"]
8741    pub param4: f32,
8742    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
8743    pub x: i32,
8744    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
8745    pub y: i32,
8746    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
8747    pub z: f32,
8748    #[doc = "The scheduled action for the mission item."]
8749    pub command: MavCmd,
8750    #[doc = "System ID"]
8751    pub target_system: u8,
8752    #[doc = "Component ID"]
8753    pub target_component: u8,
8754    #[doc = "The coordinate system of the COMMAND."]
8755    pub frame: MavFrame,
8756    #[doc = "Not used."]
8757    pub current: u8,
8758    #[doc = "Not used (set 0)."]
8759    pub autocontinue: u8,
8760}
8761impl COMMAND_INT_DATA {
8762    pub const ENCODED_LEN: usize = 35usize;
8763    pub const DEFAULT: Self = Self {
8764        param1: 0.0_f32,
8765        param2: 0.0_f32,
8766        param3: 0.0_f32,
8767        param4: 0.0_f32,
8768        x: 0_i32,
8769        y: 0_i32,
8770        z: 0.0_f32,
8771        command: MavCmd::DEFAULT,
8772        target_system: 0_u8,
8773        target_component: 0_u8,
8774        frame: MavFrame::DEFAULT,
8775        current: 0_u8,
8776        autocontinue: 0_u8,
8777    };
8778    #[cfg(feature = "arbitrary")]
8779    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8780        use arbitrary::{Arbitrary, Unstructured};
8781        let mut buf = [0u8; 1024];
8782        rng.fill_bytes(&mut buf);
8783        let mut unstructured = Unstructured::new(&buf);
8784        Self::arbitrary(&mut unstructured).unwrap_or_default()
8785    }
8786}
8787impl Default for COMMAND_INT_DATA {
8788    fn default() -> Self {
8789        Self::DEFAULT.clone()
8790    }
8791}
8792impl MessageData for COMMAND_INT_DATA {
8793    type Message = MavMessage;
8794    const ID: u32 = 75u32;
8795    const NAME: &'static str = "COMMAND_INT";
8796    const EXTRA_CRC: u8 = 158u8;
8797    const ENCODED_LEN: usize = 35usize;
8798    fn deser(
8799        _version: MavlinkVersion,
8800        __input: &[u8],
8801    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8802        let avail_len = __input.len();
8803        let mut payload_buf = [0; Self::ENCODED_LEN];
8804        let mut buf = if avail_len < Self::ENCODED_LEN {
8805            payload_buf[0..avail_len].copy_from_slice(__input);
8806            Bytes::new(&payload_buf)
8807        } else {
8808            Bytes::new(__input)
8809        };
8810        let mut __struct = Self::default();
8811        __struct.param1 = buf.get_f32_le();
8812        __struct.param2 = buf.get_f32_le();
8813        __struct.param3 = buf.get_f32_le();
8814        __struct.param4 = buf.get_f32_le();
8815        __struct.x = buf.get_i32_le();
8816        __struct.y = buf.get_i32_le();
8817        __struct.z = buf.get_f32_le();
8818        let tmp = buf.get_u16_le();
8819        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8820            ::mavlink_core::error::ParserError::InvalidEnum {
8821                enum_type: "MavCmd",
8822                value: tmp as u32,
8823            },
8824        )?;
8825        __struct.target_system = buf.get_u8();
8826        __struct.target_component = buf.get_u8();
8827        let tmp = buf.get_u8();
8828        __struct.frame =
8829            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8830                enum_type: "MavFrame",
8831                value: tmp as u32,
8832            })?;
8833        __struct.current = buf.get_u8();
8834        __struct.autocontinue = buf.get_u8();
8835        Ok(__struct)
8836    }
8837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8838        let mut __tmp = BytesMut::new(bytes);
8839        #[allow(clippy::absurd_extreme_comparisons)]
8840        #[allow(unused_comparisons)]
8841        if __tmp.remaining() < Self::ENCODED_LEN {
8842            panic!(
8843                "buffer is too small (need {} bytes, but got {})",
8844                Self::ENCODED_LEN,
8845                __tmp.remaining(),
8846            )
8847        }
8848        __tmp.put_f32_le(self.param1);
8849        __tmp.put_f32_le(self.param2);
8850        __tmp.put_f32_le(self.param3);
8851        __tmp.put_f32_le(self.param4);
8852        __tmp.put_i32_le(self.x);
8853        __tmp.put_i32_le(self.y);
8854        __tmp.put_f32_le(self.z);
8855        __tmp.put_u16_le(self.command as u16);
8856        __tmp.put_u8(self.target_system);
8857        __tmp.put_u8(self.target_component);
8858        __tmp.put_u8(self.frame as u8);
8859        __tmp.put_u8(self.current);
8860        __tmp.put_u8(self.autocontinue);
8861        if matches!(version, MavlinkVersion::V2) {
8862            let len = __tmp.len();
8863            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8864        } else {
8865            __tmp.len()
8866        }
8867    }
8868}
8869#[doc = "id: 76"]
8870#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8871#[derive(Debug, Clone, PartialEq)]
8872#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8873#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8874pub struct COMMAND_LONG_DATA {
8875    #[doc = "Parameter 1 (for the specific command)."]
8876    pub param1: f32,
8877    #[doc = "Parameter 2 (for the specific command)."]
8878    pub param2: f32,
8879    #[doc = "Parameter 3 (for the specific command)."]
8880    pub param3: f32,
8881    #[doc = "Parameter 4 (for the specific command)."]
8882    pub param4: f32,
8883    #[doc = "Parameter 5 (for the specific command)."]
8884    pub param5: f32,
8885    #[doc = "Parameter 6 (for the specific command)."]
8886    pub param6: f32,
8887    #[doc = "Parameter 7 (for the specific command)."]
8888    pub param7: f32,
8889    #[doc = "Command ID (of command to send)."]
8890    pub command: MavCmd,
8891    #[doc = "System which should execute the command"]
8892    pub target_system: u8,
8893    #[doc = "Component which should execute the command, 0 for all components"]
8894    pub target_component: u8,
8895    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
8896    pub confirmation: u8,
8897}
8898impl COMMAND_LONG_DATA {
8899    pub const ENCODED_LEN: usize = 33usize;
8900    pub const DEFAULT: Self = Self {
8901        param1: 0.0_f32,
8902        param2: 0.0_f32,
8903        param3: 0.0_f32,
8904        param4: 0.0_f32,
8905        param5: 0.0_f32,
8906        param6: 0.0_f32,
8907        param7: 0.0_f32,
8908        command: MavCmd::DEFAULT,
8909        target_system: 0_u8,
8910        target_component: 0_u8,
8911        confirmation: 0_u8,
8912    };
8913    #[cfg(feature = "arbitrary")]
8914    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8915        use arbitrary::{Arbitrary, Unstructured};
8916        let mut buf = [0u8; 1024];
8917        rng.fill_bytes(&mut buf);
8918        let mut unstructured = Unstructured::new(&buf);
8919        Self::arbitrary(&mut unstructured).unwrap_or_default()
8920    }
8921}
8922impl Default for COMMAND_LONG_DATA {
8923    fn default() -> Self {
8924        Self::DEFAULT.clone()
8925    }
8926}
8927impl MessageData for COMMAND_LONG_DATA {
8928    type Message = MavMessage;
8929    const ID: u32 = 76u32;
8930    const NAME: &'static str = "COMMAND_LONG";
8931    const EXTRA_CRC: u8 = 152u8;
8932    const ENCODED_LEN: usize = 33usize;
8933    fn deser(
8934        _version: MavlinkVersion,
8935        __input: &[u8],
8936    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8937        let avail_len = __input.len();
8938        let mut payload_buf = [0; Self::ENCODED_LEN];
8939        let mut buf = if avail_len < Self::ENCODED_LEN {
8940            payload_buf[0..avail_len].copy_from_slice(__input);
8941            Bytes::new(&payload_buf)
8942        } else {
8943            Bytes::new(__input)
8944        };
8945        let mut __struct = Self::default();
8946        __struct.param1 = buf.get_f32_le();
8947        __struct.param2 = buf.get_f32_le();
8948        __struct.param3 = buf.get_f32_le();
8949        __struct.param4 = buf.get_f32_le();
8950        __struct.param5 = buf.get_f32_le();
8951        __struct.param6 = buf.get_f32_le();
8952        __struct.param7 = buf.get_f32_le();
8953        let tmp = buf.get_u16_le();
8954        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8955            ::mavlink_core::error::ParserError::InvalidEnum {
8956                enum_type: "MavCmd",
8957                value: tmp as u32,
8958            },
8959        )?;
8960        __struct.target_system = buf.get_u8();
8961        __struct.target_component = buf.get_u8();
8962        __struct.confirmation = buf.get_u8();
8963        Ok(__struct)
8964    }
8965    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8966        let mut __tmp = BytesMut::new(bytes);
8967        #[allow(clippy::absurd_extreme_comparisons)]
8968        #[allow(unused_comparisons)]
8969        if __tmp.remaining() < Self::ENCODED_LEN {
8970            panic!(
8971                "buffer is too small (need {} bytes, but got {})",
8972                Self::ENCODED_LEN,
8973                __tmp.remaining(),
8974            )
8975        }
8976        __tmp.put_f32_le(self.param1);
8977        __tmp.put_f32_le(self.param2);
8978        __tmp.put_f32_le(self.param3);
8979        __tmp.put_f32_le(self.param4);
8980        __tmp.put_f32_le(self.param5);
8981        __tmp.put_f32_le(self.param6);
8982        __tmp.put_f32_le(self.param7);
8983        __tmp.put_u16_le(self.command as u16);
8984        __tmp.put_u8(self.target_system);
8985        __tmp.put_u8(self.target_component);
8986        __tmp.put_u8(self.confirmation);
8987        if matches!(version, MavlinkVersion::V2) {
8988            let len = __tmp.len();
8989            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8990        } else {
8991            __tmp.len()
8992        }
8993    }
8994}
8995#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
8996#[doc = "id: 395"]
8997#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
8998#[derive(Debug, Clone, PartialEq)]
8999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9001pub struct COMPONENT_INFORMATION_DATA {
9002    #[doc = "Timestamp (time since system boot)."]
9003    pub time_boot_ms: u32,
9004    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9005    pub general_metadata_file_crc: u32,
9006    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9007    pub peripherals_metadata_file_crc: u32,
9008    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9009    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9010    pub general_metadata_uri: [u8; 100],
9011    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9012    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9013    pub peripherals_metadata_uri: [u8; 100],
9014}
9015impl COMPONENT_INFORMATION_DATA {
9016    pub const ENCODED_LEN: usize = 212usize;
9017    pub const DEFAULT: Self = Self {
9018        time_boot_ms: 0_u32,
9019        general_metadata_file_crc: 0_u32,
9020        peripherals_metadata_file_crc: 0_u32,
9021        general_metadata_uri: [0_u8; 100usize],
9022        peripherals_metadata_uri: [0_u8; 100usize],
9023    };
9024    #[cfg(feature = "arbitrary")]
9025    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9026        use arbitrary::{Arbitrary, Unstructured};
9027        let mut buf = [0u8; 1024];
9028        rng.fill_bytes(&mut buf);
9029        let mut unstructured = Unstructured::new(&buf);
9030        Self::arbitrary(&mut unstructured).unwrap_or_default()
9031    }
9032}
9033impl Default for COMPONENT_INFORMATION_DATA {
9034    fn default() -> Self {
9035        Self::DEFAULT.clone()
9036    }
9037}
9038impl MessageData for COMPONENT_INFORMATION_DATA {
9039    type Message = MavMessage;
9040    const ID: u32 = 395u32;
9041    const NAME: &'static str = "COMPONENT_INFORMATION";
9042    const EXTRA_CRC: u8 = 0u8;
9043    const ENCODED_LEN: usize = 212usize;
9044    fn deser(
9045        _version: MavlinkVersion,
9046        __input: &[u8],
9047    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9048        let avail_len = __input.len();
9049        let mut payload_buf = [0; Self::ENCODED_LEN];
9050        let mut buf = if avail_len < Self::ENCODED_LEN {
9051            payload_buf[0..avail_len].copy_from_slice(__input);
9052            Bytes::new(&payload_buf)
9053        } else {
9054            Bytes::new(__input)
9055        };
9056        let mut __struct = Self::default();
9057        __struct.time_boot_ms = buf.get_u32_le();
9058        __struct.general_metadata_file_crc = buf.get_u32_le();
9059        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9060        for v in &mut __struct.general_metadata_uri {
9061            let val = buf.get_u8();
9062            *v = val;
9063        }
9064        for v in &mut __struct.peripherals_metadata_uri {
9065            let val = buf.get_u8();
9066            *v = val;
9067        }
9068        Ok(__struct)
9069    }
9070    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9071        let mut __tmp = BytesMut::new(bytes);
9072        #[allow(clippy::absurd_extreme_comparisons)]
9073        #[allow(unused_comparisons)]
9074        if __tmp.remaining() < Self::ENCODED_LEN {
9075            panic!(
9076                "buffer is too small (need {} bytes, but got {})",
9077                Self::ENCODED_LEN,
9078                __tmp.remaining(),
9079            )
9080        }
9081        __tmp.put_u32_le(self.time_boot_ms);
9082        __tmp.put_u32_le(self.general_metadata_file_crc);
9083        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9084        for val in &self.general_metadata_uri {
9085            __tmp.put_u8(*val);
9086        }
9087        for val in &self.peripherals_metadata_uri {
9088            __tmp.put_u8(*val);
9089        }
9090        if matches!(version, MavlinkVersion::V2) {
9091            let len = __tmp.len();
9092            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9093        } else {
9094            __tmp.len()
9095        }
9096    }
9097}
9098#[doc = "id: 396"]
9099#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9100#[derive(Debug, Clone, PartialEq)]
9101#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9102#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9103pub struct COMPONENT_INFORMATION_BASIC_DATA {
9104    #[doc = "Component capability flags"]
9105    pub capabilities: MavProtocolCapability,
9106    #[doc = "Timestamp (time since system boot)."]
9107    pub time_boot_ms: u32,
9108    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9109    pub time_manufacture_s: u32,
9110    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9111    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9112    pub vendor_name: [u8; 32],
9113    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9114    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9115    pub model_name: [u8; 32],
9116    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9117    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9118    pub software_version: [u8; 24],
9119    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9120    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9121    pub hardware_version: [u8; 24],
9122    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9123    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9124    pub serial_number: [u8; 32],
9125}
9126impl COMPONENT_INFORMATION_BASIC_DATA {
9127    pub const ENCODED_LEN: usize = 160usize;
9128    pub const DEFAULT: Self = Self {
9129        capabilities: MavProtocolCapability::DEFAULT,
9130        time_boot_ms: 0_u32,
9131        time_manufacture_s: 0_u32,
9132        vendor_name: [0_u8; 32usize],
9133        model_name: [0_u8; 32usize],
9134        software_version: [0_u8; 24usize],
9135        hardware_version: [0_u8; 24usize],
9136        serial_number: [0_u8; 32usize],
9137    };
9138    #[cfg(feature = "arbitrary")]
9139    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9140        use arbitrary::{Arbitrary, Unstructured};
9141        let mut buf = [0u8; 1024];
9142        rng.fill_bytes(&mut buf);
9143        let mut unstructured = Unstructured::new(&buf);
9144        Self::arbitrary(&mut unstructured).unwrap_or_default()
9145    }
9146}
9147impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9148    fn default() -> Self {
9149        Self::DEFAULT.clone()
9150    }
9151}
9152impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9153    type Message = MavMessage;
9154    const ID: u32 = 396u32;
9155    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9156    const EXTRA_CRC: u8 = 50u8;
9157    const ENCODED_LEN: usize = 160usize;
9158    fn deser(
9159        _version: MavlinkVersion,
9160        __input: &[u8],
9161    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9162        let avail_len = __input.len();
9163        let mut payload_buf = [0; Self::ENCODED_LEN];
9164        let mut buf = if avail_len < Self::ENCODED_LEN {
9165            payload_buf[0..avail_len].copy_from_slice(__input);
9166            Bytes::new(&payload_buf)
9167        } else {
9168            Bytes::new(__input)
9169        };
9170        let mut __struct = Self::default();
9171        let tmp = buf.get_u64_le();
9172        __struct.capabilities = MavProtocolCapability::from_bits(
9173            tmp & MavProtocolCapability::all().bits(),
9174        )
9175        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9176            flag_type: "MavProtocolCapability",
9177            value: tmp as u32,
9178        })?;
9179        __struct.time_boot_ms = buf.get_u32_le();
9180        __struct.time_manufacture_s = buf.get_u32_le();
9181        for v in &mut __struct.vendor_name {
9182            let val = buf.get_u8();
9183            *v = val;
9184        }
9185        for v in &mut __struct.model_name {
9186            let val = buf.get_u8();
9187            *v = val;
9188        }
9189        for v in &mut __struct.software_version {
9190            let val = buf.get_u8();
9191            *v = val;
9192        }
9193        for v in &mut __struct.hardware_version {
9194            let val = buf.get_u8();
9195            *v = val;
9196        }
9197        for v in &mut __struct.serial_number {
9198            let val = buf.get_u8();
9199            *v = val;
9200        }
9201        Ok(__struct)
9202    }
9203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9204        let mut __tmp = BytesMut::new(bytes);
9205        #[allow(clippy::absurd_extreme_comparisons)]
9206        #[allow(unused_comparisons)]
9207        if __tmp.remaining() < Self::ENCODED_LEN {
9208            panic!(
9209                "buffer is too small (need {} bytes, but got {})",
9210                Self::ENCODED_LEN,
9211                __tmp.remaining(),
9212            )
9213        }
9214        __tmp.put_u64_le(self.capabilities.bits());
9215        __tmp.put_u32_le(self.time_boot_ms);
9216        __tmp.put_u32_le(self.time_manufacture_s);
9217        for val in &self.vendor_name {
9218            __tmp.put_u8(*val);
9219        }
9220        for val in &self.model_name {
9221            __tmp.put_u8(*val);
9222        }
9223        for val in &self.software_version {
9224            __tmp.put_u8(*val);
9225        }
9226        for val in &self.hardware_version {
9227            __tmp.put_u8(*val);
9228        }
9229        for val in &self.serial_number {
9230            __tmp.put_u8(*val);
9231        }
9232        if matches!(version, MavlinkVersion::V2) {
9233            let len = __tmp.len();
9234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9235        } else {
9236            __tmp.len()
9237        }
9238    }
9239}
9240#[doc = "id: 397"]
9241#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9242#[derive(Debug, Clone, PartialEq)]
9243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9245pub struct COMPONENT_METADATA_DATA {
9246    #[doc = "Timestamp (time since system boot)."]
9247    pub time_boot_ms: u32,
9248    #[doc = "CRC32 of the general metadata file."]
9249    pub file_crc: u32,
9250    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9251    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9252    pub uri: [u8; 100],
9253}
9254impl COMPONENT_METADATA_DATA {
9255    pub const ENCODED_LEN: usize = 108usize;
9256    pub const DEFAULT: Self = Self {
9257        time_boot_ms: 0_u32,
9258        file_crc: 0_u32,
9259        uri: [0_u8; 100usize],
9260    };
9261    #[cfg(feature = "arbitrary")]
9262    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9263        use arbitrary::{Arbitrary, Unstructured};
9264        let mut buf = [0u8; 1024];
9265        rng.fill_bytes(&mut buf);
9266        let mut unstructured = Unstructured::new(&buf);
9267        Self::arbitrary(&mut unstructured).unwrap_or_default()
9268    }
9269}
9270impl Default for COMPONENT_METADATA_DATA {
9271    fn default() -> Self {
9272        Self::DEFAULT.clone()
9273    }
9274}
9275impl MessageData for COMPONENT_METADATA_DATA {
9276    type Message = MavMessage;
9277    const ID: u32 = 397u32;
9278    const NAME: &'static str = "COMPONENT_METADATA";
9279    const EXTRA_CRC: u8 = 182u8;
9280    const ENCODED_LEN: usize = 108usize;
9281    fn deser(
9282        _version: MavlinkVersion,
9283        __input: &[u8],
9284    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9285        let avail_len = __input.len();
9286        let mut payload_buf = [0; Self::ENCODED_LEN];
9287        let mut buf = if avail_len < Self::ENCODED_LEN {
9288            payload_buf[0..avail_len].copy_from_slice(__input);
9289            Bytes::new(&payload_buf)
9290        } else {
9291            Bytes::new(__input)
9292        };
9293        let mut __struct = Self::default();
9294        __struct.time_boot_ms = buf.get_u32_le();
9295        __struct.file_crc = buf.get_u32_le();
9296        for v in &mut __struct.uri {
9297            let val = buf.get_u8();
9298            *v = val;
9299        }
9300        Ok(__struct)
9301    }
9302    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9303        let mut __tmp = BytesMut::new(bytes);
9304        #[allow(clippy::absurd_extreme_comparisons)]
9305        #[allow(unused_comparisons)]
9306        if __tmp.remaining() < Self::ENCODED_LEN {
9307            panic!(
9308                "buffer is too small (need {} bytes, but got {})",
9309                Self::ENCODED_LEN,
9310                __tmp.remaining(),
9311            )
9312        }
9313        __tmp.put_u32_le(self.time_boot_ms);
9314        __tmp.put_u32_le(self.file_crc);
9315        for val in &self.uri {
9316            __tmp.put_u8(*val);
9317        }
9318        if matches!(version, MavlinkVersion::V2) {
9319            let len = __tmp.len();
9320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9321        } else {
9322            __tmp.len()
9323        }
9324    }
9325}
9326#[doc = "id: 146"]
9327#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9328#[derive(Debug, Clone, PartialEq)]
9329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9331pub struct CONTROL_SYSTEM_STATE_DATA {
9332    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9333    pub time_usec: u64,
9334    #[doc = "X acceleration in body frame"]
9335    pub x_acc: f32,
9336    #[doc = "Y acceleration in body frame"]
9337    pub y_acc: f32,
9338    #[doc = "Z acceleration in body frame"]
9339    pub z_acc: f32,
9340    #[doc = "X velocity in body frame"]
9341    pub x_vel: f32,
9342    #[doc = "Y velocity in body frame"]
9343    pub y_vel: f32,
9344    #[doc = "Z velocity in body frame"]
9345    pub z_vel: f32,
9346    #[doc = "X position in local frame"]
9347    pub x_pos: f32,
9348    #[doc = "Y position in local frame"]
9349    pub y_pos: f32,
9350    #[doc = "Z position in local frame"]
9351    pub z_pos: f32,
9352    #[doc = "Airspeed, set to -1 if unknown"]
9353    pub airspeed: f32,
9354    #[doc = "Variance of body velocity estimate"]
9355    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9356    pub vel_variance: [f32; 3],
9357    #[doc = "Variance in local position"]
9358    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9359    pub pos_variance: [f32; 3],
9360    #[doc = "The attitude, represented as Quaternion"]
9361    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9362    pub q: [f32; 4],
9363    #[doc = "Angular rate in roll axis"]
9364    pub roll_rate: f32,
9365    #[doc = "Angular rate in pitch axis"]
9366    pub pitch_rate: f32,
9367    #[doc = "Angular rate in yaw axis"]
9368    pub yaw_rate: f32,
9369}
9370impl CONTROL_SYSTEM_STATE_DATA {
9371    pub const ENCODED_LEN: usize = 100usize;
9372    pub const DEFAULT: Self = Self {
9373        time_usec: 0_u64,
9374        x_acc: 0.0_f32,
9375        y_acc: 0.0_f32,
9376        z_acc: 0.0_f32,
9377        x_vel: 0.0_f32,
9378        y_vel: 0.0_f32,
9379        z_vel: 0.0_f32,
9380        x_pos: 0.0_f32,
9381        y_pos: 0.0_f32,
9382        z_pos: 0.0_f32,
9383        airspeed: 0.0_f32,
9384        vel_variance: [0.0_f32; 3usize],
9385        pos_variance: [0.0_f32; 3usize],
9386        q: [0.0_f32; 4usize],
9387        roll_rate: 0.0_f32,
9388        pitch_rate: 0.0_f32,
9389        yaw_rate: 0.0_f32,
9390    };
9391    #[cfg(feature = "arbitrary")]
9392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9393        use arbitrary::{Arbitrary, Unstructured};
9394        let mut buf = [0u8; 1024];
9395        rng.fill_bytes(&mut buf);
9396        let mut unstructured = Unstructured::new(&buf);
9397        Self::arbitrary(&mut unstructured).unwrap_or_default()
9398    }
9399}
9400impl Default for CONTROL_SYSTEM_STATE_DATA {
9401    fn default() -> Self {
9402        Self::DEFAULT.clone()
9403    }
9404}
9405impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9406    type Message = MavMessage;
9407    const ID: u32 = 146u32;
9408    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9409    const EXTRA_CRC: u8 = 103u8;
9410    const ENCODED_LEN: usize = 100usize;
9411    fn deser(
9412        _version: MavlinkVersion,
9413        __input: &[u8],
9414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9415        let avail_len = __input.len();
9416        let mut payload_buf = [0; Self::ENCODED_LEN];
9417        let mut buf = if avail_len < Self::ENCODED_LEN {
9418            payload_buf[0..avail_len].copy_from_slice(__input);
9419            Bytes::new(&payload_buf)
9420        } else {
9421            Bytes::new(__input)
9422        };
9423        let mut __struct = Self::default();
9424        __struct.time_usec = buf.get_u64_le();
9425        __struct.x_acc = buf.get_f32_le();
9426        __struct.y_acc = buf.get_f32_le();
9427        __struct.z_acc = buf.get_f32_le();
9428        __struct.x_vel = buf.get_f32_le();
9429        __struct.y_vel = buf.get_f32_le();
9430        __struct.z_vel = buf.get_f32_le();
9431        __struct.x_pos = buf.get_f32_le();
9432        __struct.y_pos = buf.get_f32_le();
9433        __struct.z_pos = buf.get_f32_le();
9434        __struct.airspeed = buf.get_f32_le();
9435        for v in &mut __struct.vel_variance {
9436            let val = buf.get_f32_le();
9437            *v = val;
9438        }
9439        for v in &mut __struct.pos_variance {
9440            let val = buf.get_f32_le();
9441            *v = val;
9442        }
9443        for v in &mut __struct.q {
9444            let val = buf.get_f32_le();
9445            *v = val;
9446        }
9447        __struct.roll_rate = buf.get_f32_le();
9448        __struct.pitch_rate = buf.get_f32_le();
9449        __struct.yaw_rate = buf.get_f32_le();
9450        Ok(__struct)
9451    }
9452    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9453        let mut __tmp = BytesMut::new(bytes);
9454        #[allow(clippy::absurd_extreme_comparisons)]
9455        #[allow(unused_comparisons)]
9456        if __tmp.remaining() < Self::ENCODED_LEN {
9457            panic!(
9458                "buffer is too small (need {} bytes, but got {})",
9459                Self::ENCODED_LEN,
9460                __tmp.remaining(),
9461            )
9462        }
9463        __tmp.put_u64_le(self.time_usec);
9464        __tmp.put_f32_le(self.x_acc);
9465        __tmp.put_f32_le(self.y_acc);
9466        __tmp.put_f32_le(self.z_acc);
9467        __tmp.put_f32_le(self.x_vel);
9468        __tmp.put_f32_le(self.y_vel);
9469        __tmp.put_f32_le(self.z_vel);
9470        __tmp.put_f32_le(self.x_pos);
9471        __tmp.put_f32_le(self.y_pos);
9472        __tmp.put_f32_le(self.z_pos);
9473        __tmp.put_f32_le(self.airspeed);
9474        for val in &self.vel_variance {
9475            __tmp.put_f32_le(*val);
9476        }
9477        for val in &self.pos_variance {
9478            __tmp.put_f32_le(*val);
9479        }
9480        for val in &self.q {
9481            __tmp.put_f32_le(*val);
9482        }
9483        __tmp.put_f32_le(self.roll_rate);
9484        __tmp.put_f32_le(self.pitch_rate);
9485        __tmp.put_f32_le(self.yaw_rate);
9486        if matches!(version, MavlinkVersion::V2) {
9487            let len = __tmp.len();
9488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9489        } else {
9490            __tmp.len()
9491        }
9492    }
9493}
9494#[doc = "id: 50005"]
9495#[doc = "offset response to encapsulated data."]
9496#[derive(Debug, Clone, PartialEq)]
9497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9499pub struct CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9500    #[doc = "FW Offset."]
9501    pub offset: u32,
9502    #[doc = "System ID."]
9503    pub target_system: u8,
9504    #[doc = "Component ID."]
9505    pub target_component: u8,
9506}
9507impl CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9508    pub const ENCODED_LEN: usize = 6usize;
9509    pub const DEFAULT: Self = Self {
9510        offset: 0_u32,
9511        target_system: 0_u8,
9512        target_component: 0_u8,
9513    };
9514    #[cfg(feature = "arbitrary")]
9515    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9516        use arbitrary::{Arbitrary, Unstructured};
9517        let mut buf = [0u8; 1024];
9518        rng.fill_bytes(&mut buf);
9519        let mut unstructured = Unstructured::new(&buf);
9520        Self::arbitrary(&mut unstructured).unwrap_or_default()
9521    }
9522}
9523impl Default for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9524    fn default() -> Self {
9525        Self::DEFAULT.clone()
9526    }
9527}
9528impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA {
9529    type Message = MavMessage;
9530    const ID: u32 = 50005u32;
9531    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_RESP";
9532    const EXTRA_CRC: u8 = 152u8;
9533    const ENCODED_LEN: usize = 6usize;
9534    fn deser(
9535        _version: MavlinkVersion,
9536        __input: &[u8],
9537    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9538        let avail_len = __input.len();
9539        let mut payload_buf = [0; Self::ENCODED_LEN];
9540        let mut buf = if avail_len < Self::ENCODED_LEN {
9541            payload_buf[0..avail_len].copy_from_slice(__input);
9542            Bytes::new(&payload_buf)
9543        } else {
9544            Bytes::new(__input)
9545        };
9546        let mut __struct = Self::default();
9547        __struct.offset = buf.get_u32_le();
9548        __struct.target_system = buf.get_u8();
9549        __struct.target_component = buf.get_u8();
9550        Ok(__struct)
9551    }
9552    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9553        let mut __tmp = BytesMut::new(bytes);
9554        #[allow(clippy::absurd_extreme_comparisons)]
9555        #[allow(unused_comparisons)]
9556        if __tmp.remaining() < Self::ENCODED_LEN {
9557            panic!(
9558                "buffer is too small (need {} bytes, but got {})",
9559                Self::ENCODED_LEN,
9560                __tmp.remaining(),
9561            )
9562        }
9563        __tmp.put_u32_le(self.offset);
9564        __tmp.put_u8(self.target_system);
9565        __tmp.put_u8(self.target_component);
9566        if matches!(version, MavlinkVersion::V2) {
9567            let len = __tmp.len();
9568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9569        } else {
9570            __tmp.len()
9571        }
9572    }
9573}
9574#[doc = "id: 50004"]
9575#[doc = "Start firmware update with encapsulated data."]
9576#[derive(Debug, Clone, PartialEq)]
9577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9579pub struct CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
9580    #[doc = "FW Size."]
9581    pub size: u32,
9582    #[doc = "FW CRC."]
9583    pub crc: u32,
9584    #[doc = "System ID."]
9585    pub target_system: u8,
9586    #[doc = "Component ID."]
9587    pub target_component: u8,
9588}
9589impl CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
9590    pub const ENCODED_LEN: usize = 10usize;
9591    pub const DEFAULT: Self = Self {
9592        size: 0_u32,
9593        crc: 0_u32,
9594        target_system: 0_u8,
9595        target_component: 0_u8,
9596    };
9597    #[cfg(feature = "arbitrary")]
9598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9599        use arbitrary::{Arbitrary, Unstructured};
9600        let mut buf = [0u8; 1024];
9601        rng.fill_bytes(&mut buf);
9602        let mut unstructured = Unstructured::new(&buf);
9603        Self::arbitrary(&mut unstructured).unwrap_or_default()
9604    }
9605}
9606impl Default for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
9607    fn default() -> Self {
9608        Self::DEFAULT.clone()
9609    }
9610}
9611impl MessageData for CUBEPILOT_FIRMWARE_UPDATE_START_DATA {
9612    type Message = MavMessage;
9613    const ID: u32 = 50004u32;
9614    const NAME: &'static str = "CUBEPILOT_FIRMWARE_UPDATE_START";
9615    const EXTRA_CRC: u8 = 240u8;
9616    const ENCODED_LEN: usize = 10usize;
9617    fn deser(
9618        _version: MavlinkVersion,
9619        __input: &[u8],
9620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9621        let avail_len = __input.len();
9622        let mut payload_buf = [0; Self::ENCODED_LEN];
9623        let mut buf = if avail_len < Self::ENCODED_LEN {
9624            payload_buf[0..avail_len].copy_from_slice(__input);
9625            Bytes::new(&payload_buf)
9626        } else {
9627            Bytes::new(__input)
9628        };
9629        let mut __struct = Self::default();
9630        __struct.size = buf.get_u32_le();
9631        __struct.crc = buf.get_u32_le();
9632        __struct.target_system = buf.get_u8();
9633        __struct.target_component = buf.get_u8();
9634        Ok(__struct)
9635    }
9636    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9637        let mut __tmp = BytesMut::new(bytes);
9638        #[allow(clippy::absurd_extreme_comparisons)]
9639        #[allow(unused_comparisons)]
9640        if __tmp.remaining() < Self::ENCODED_LEN {
9641            panic!(
9642                "buffer is too small (need {} bytes, but got {})",
9643                Self::ENCODED_LEN,
9644                __tmp.remaining(),
9645            )
9646        }
9647        __tmp.put_u32_le(self.size);
9648        __tmp.put_u32_le(self.crc);
9649        __tmp.put_u8(self.target_system);
9650        __tmp.put_u8(self.target_component);
9651        if matches!(version, MavlinkVersion::V2) {
9652            let len = __tmp.len();
9653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9654        } else {
9655            __tmp.len()
9656        }
9657    }
9658}
9659#[doc = "id: 50001"]
9660#[doc = "Raw RC Data."]
9661#[derive(Debug, Clone, PartialEq)]
9662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9664pub struct CUBEPILOT_RAW_RC_DATA {}
9665impl CUBEPILOT_RAW_RC_DATA {
9666    pub const ENCODED_LEN: usize = 0usize;
9667    pub const DEFAULT: Self = Self {};
9668    #[cfg(feature = "arbitrary")]
9669    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9670        use arbitrary::{Arbitrary, Unstructured};
9671        let mut buf = [0u8; 1024];
9672        rng.fill_bytes(&mut buf);
9673        let mut unstructured = Unstructured::new(&buf);
9674        Self::arbitrary(&mut unstructured).unwrap_or_default()
9675    }
9676}
9677impl Default for CUBEPILOT_RAW_RC_DATA {
9678    fn default() -> Self {
9679        Self::DEFAULT.clone()
9680    }
9681}
9682impl MessageData for CUBEPILOT_RAW_RC_DATA {
9683    type Message = MavMessage;
9684    const ID: u32 = 50001u32;
9685    const NAME: &'static str = "CUBEPILOT_RAW_RC";
9686    const EXTRA_CRC: u8 = 1u8;
9687    const ENCODED_LEN: usize = 0usize;
9688    fn deser(
9689        _version: MavlinkVersion,
9690        __input: &[u8],
9691    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9692        Ok(Self::default())
9693    }
9694    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9695        let mut __tmp = BytesMut::new(bytes);
9696        #[allow(clippy::absurd_extreme_comparisons)]
9697        #[allow(unused_comparisons)]
9698        if __tmp.remaining() < Self::ENCODED_LEN {
9699            panic!(
9700                "buffer is too small (need {} bytes, but got {})",
9701                Self::ENCODED_LEN,
9702                __tmp.remaining(),
9703            )
9704        }
9705        if matches!(version, MavlinkVersion::V2) {
9706            let len = __tmp.len();
9707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9708        } else {
9709            __tmp.len()
9710        }
9711    }
9712}
9713#[doc = "id: 411"]
9714#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9715#[derive(Debug, Clone, PartialEq)]
9716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9718pub struct CURRENT_EVENT_SEQUENCE_DATA {
9719    #[doc = "Sequence number."]
9720    pub sequence: u16,
9721    #[doc = "Flag bitset."]
9722    pub flags: MavEventCurrentSequenceFlags,
9723}
9724impl CURRENT_EVENT_SEQUENCE_DATA {
9725    pub const ENCODED_LEN: usize = 3usize;
9726    pub const DEFAULT: Self = Self {
9727        sequence: 0_u16,
9728        flags: MavEventCurrentSequenceFlags::DEFAULT,
9729    };
9730    #[cfg(feature = "arbitrary")]
9731    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9732        use arbitrary::{Arbitrary, Unstructured};
9733        let mut buf = [0u8; 1024];
9734        rng.fill_bytes(&mut buf);
9735        let mut unstructured = Unstructured::new(&buf);
9736        Self::arbitrary(&mut unstructured).unwrap_or_default()
9737    }
9738}
9739impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9740    fn default() -> Self {
9741        Self::DEFAULT.clone()
9742    }
9743}
9744impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9745    type Message = MavMessage;
9746    const ID: u32 = 411u32;
9747    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9748    const EXTRA_CRC: u8 = 106u8;
9749    const ENCODED_LEN: usize = 3usize;
9750    fn deser(
9751        _version: MavlinkVersion,
9752        __input: &[u8],
9753    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9754        let avail_len = __input.len();
9755        let mut payload_buf = [0; Self::ENCODED_LEN];
9756        let mut buf = if avail_len < Self::ENCODED_LEN {
9757            payload_buf[0..avail_len].copy_from_slice(__input);
9758            Bytes::new(&payload_buf)
9759        } else {
9760            Bytes::new(__input)
9761        };
9762        let mut __struct = Self::default();
9763        __struct.sequence = buf.get_u16_le();
9764        let tmp = buf.get_u8();
9765        __struct.flags =
9766            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9767                enum_type: "MavEventCurrentSequenceFlags",
9768                value: tmp as u32,
9769            })?;
9770        Ok(__struct)
9771    }
9772    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9773        let mut __tmp = BytesMut::new(bytes);
9774        #[allow(clippy::absurd_extreme_comparisons)]
9775        #[allow(unused_comparisons)]
9776        if __tmp.remaining() < Self::ENCODED_LEN {
9777            panic!(
9778                "buffer is too small (need {} bytes, but got {})",
9779                Self::ENCODED_LEN,
9780                __tmp.remaining(),
9781            )
9782        }
9783        __tmp.put_u16_le(self.sequence);
9784        __tmp.put_u8(self.flags as u8);
9785        if matches!(version, MavlinkVersion::V2) {
9786            let len = __tmp.len();
9787            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9788        } else {
9789            __tmp.len()
9790        }
9791    }
9792}
9793#[doc = "id: 436"]
9794#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9795#[derive(Debug, Clone, PartialEq)]
9796#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9797#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9798pub struct CURRENT_MODE_DATA {
9799    #[doc = "A bitfield for use for autopilot-specific flags"]
9800    pub custom_mode: u32,
9801    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
9802    pub intended_custom_mode: u32,
9803    #[doc = "Standard mode."]
9804    pub standard_mode: MavStandardMode,
9805}
9806impl CURRENT_MODE_DATA {
9807    pub const ENCODED_LEN: usize = 9usize;
9808    pub const DEFAULT: Self = Self {
9809        custom_mode: 0_u32,
9810        intended_custom_mode: 0_u32,
9811        standard_mode: MavStandardMode::DEFAULT,
9812    };
9813    #[cfg(feature = "arbitrary")]
9814    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9815        use arbitrary::{Arbitrary, Unstructured};
9816        let mut buf = [0u8; 1024];
9817        rng.fill_bytes(&mut buf);
9818        let mut unstructured = Unstructured::new(&buf);
9819        Self::arbitrary(&mut unstructured).unwrap_or_default()
9820    }
9821}
9822impl Default for CURRENT_MODE_DATA {
9823    fn default() -> Self {
9824        Self::DEFAULT.clone()
9825    }
9826}
9827impl MessageData for CURRENT_MODE_DATA {
9828    type Message = MavMessage;
9829    const ID: u32 = 436u32;
9830    const NAME: &'static str = "CURRENT_MODE";
9831    const EXTRA_CRC: u8 = 193u8;
9832    const ENCODED_LEN: usize = 9usize;
9833    fn deser(
9834        _version: MavlinkVersion,
9835        __input: &[u8],
9836    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9837        let avail_len = __input.len();
9838        let mut payload_buf = [0; Self::ENCODED_LEN];
9839        let mut buf = if avail_len < Self::ENCODED_LEN {
9840            payload_buf[0..avail_len].copy_from_slice(__input);
9841            Bytes::new(&payload_buf)
9842        } else {
9843            Bytes::new(__input)
9844        };
9845        let mut __struct = Self::default();
9846        __struct.custom_mode = buf.get_u32_le();
9847        __struct.intended_custom_mode = buf.get_u32_le();
9848        let tmp = buf.get_u8();
9849        __struct.standard_mode =
9850            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9851                enum_type: "MavStandardMode",
9852                value: tmp as u32,
9853            })?;
9854        Ok(__struct)
9855    }
9856    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9857        let mut __tmp = BytesMut::new(bytes);
9858        #[allow(clippy::absurd_extreme_comparisons)]
9859        #[allow(unused_comparisons)]
9860        if __tmp.remaining() < Self::ENCODED_LEN {
9861            panic!(
9862                "buffer is too small (need {} bytes, but got {})",
9863                Self::ENCODED_LEN,
9864                __tmp.remaining(),
9865            )
9866        }
9867        __tmp.put_u32_le(self.custom_mode);
9868        __tmp.put_u32_le(self.intended_custom_mode);
9869        __tmp.put_u8(self.standard_mode as u8);
9870        if matches!(version, MavlinkVersion::V2) {
9871            let len = __tmp.len();
9872            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9873        } else {
9874            __tmp.len()
9875        }
9876    }
9877}
9878#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
9879#[doc = "id: 67"]
9880#[doc = "Data stream status information."]
9881#[derive(Debug, Clone, PartialEq)]
9882#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9883#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9884pub struct DATA_STREAM_DATA {
9885    #[doc = "The message rate"]
9886    pub message_rate: u16,
9887    #[doc = "The ID of the requested data stream"]
9888    pub stream_id: u8,
9889    #[doc = "1 stream is enabled, 0 stream is stopped."]
9890    pub on_off: u8,
9891}
9892impl DATA_STREAM_DATA {
9893    pub const ENCODED_LEN: usize = 4usize;
9894    pub const DEFAULT: Self = Self {
9895        message_rate: 0_u16,
9896        stream_id: 0_u8,
9897        on_off: 0_u8,
9898    };
9899    #[cfg(feature = "arbitrary")]
9900    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9901        use arbitrary::{Arbitrary, Unstructured};
9902        let mut buf = [0u8; 1024];
9903        rng.fill_bytes(&mut buf);
9904        let mut unstructured = Unstructured::new(&buf);
9905        Self::arbitrary(&mut unstructured).unwrap_or_default()
9906    }
9907}
9908impl Default for DATA_STREAM_DATA {
9909    fn default() -> Self {
9910        Self::DEFAULT.clone()
9911    }
9912}
9913impl MessageData for DATA_STREAM_DATA {
9914    type Message = MavMessage;
9915    const ID: u32 = 67u32;
9916    const NAME: &'static str = "DATA_STREAM";
9917    const EXTRA_CRC: u8 = 21u8;
9918    const ENCODED_LEN: usize = 4usize;
9919    fn deser(
9920        _version: MavlinkVersion,
9921        __input: &[u8],
9922    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9923        let avail_len = __input.len();
9924        let mut payload_buf = [0; Self::ENCODED_LEN];
9925        let mut buf = if avail_len < Self::ENCODED_LEN {
9926            payload_buf[0..avail_len].copy_from_slice(__input);
9927            Bytes::new(&payload_buf)
9928        } else {
9929            Bytes::new(__input)
9930        };
9931        let mut __struct = Self::default();
9932        __struct.message_rate = buf.get_u16_le();
9933        __struct.stream_id = buf.get_u8();
9934        __struct.on_off = buf.get_u8();
9935        Ok(__struct)
9936    }
9937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9938        let mut __tmp = BytesMut::new(bytes);
9939        #[allow(clippy::absurd_extreme_comparisons)]
9940        #[allow(unused_comparisons)]
9941        if __tmp.remaining() < Self::ENCODED_LEN {
9942            panic!(
9943                "buffer is too small (need {} bytes, but got {})",
9944                Self::ENCODED_LEN,
9945                __tmp.remaining(),
9946            )
9947        }
9948        __tmp.put_u16_le(self.message_rate);
9949        __tmp.put_u8(self.stream_id);
9950        __tmp.put_u8(self.on_off);
9951        if matches!(version, MavlinkVersion::V2) {
9952            let len = __tmp.len();
9953            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9954        } else {
9955            __tmp.len()
9956        }
9957    }
9958}
9959#[doc = "id: 130"]
9960#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
9961#[derive(Debug, Clone, PartialEq)]
9962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9964pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
9965    #[doc = "total data size (set on ACK only)."]
9966    pub size: u32,
9967    #[doc = "Width of a matrix or image."]
9968    pub width: u16,
9969    #[doc = "Height of a matrix or image."]
9970    pub height: u16,
9971    #[doc = "Number of packets being sent (set on ACK only)."]
9972    pub packets: u16,
9973    #[doc = "Type of requested/acknowledged data."]
9974    pub mavtype: MavlinkDataStreamType,
9975    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
9976    pub payload: u8,
9977    #[doc = "JPEG quality. Values: [1-100]."]
9978    pub jpg_quality: u8,
9979}
9980impl DATA_TRANSMISSION_HANDSHAKE_DATA {
9981    pub const ENCODED_LEN: usize = 13usize;
9982    pub const DEFAULT: Self = Self {
9983        size: 0_u32,
9984        width: 0_u16,
9985        height: 0_u16,
9986        packets: 0_u16,
9987        mavtype: MavlinkDataStreamType::DEFAULT,
9988        payload: 0_u8,
9989        jpg_quality: 0_u8,
9990    };
9991    #[cfg(feature = "arbitrary")]
9992    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9993        use arbitrary::{Arbitrary, Unstructured};
9994        let mut buf = [0u8; 1024];
9995        rng.fill_bytes(&mut buf);
9996        let mut unstructured = Unstructured::new(&buf);
9997        Self::arbitrary(&mut unstructured).unwrap_or_default()
9998    }
9999}
10000impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
10001    fn default() -> Self {
10002        Self::DEFAULT.clone()
10003    }
10004}
10005impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
10006    type Message = MavMessage;
10007    const ID: u32 = 130u32;
10008    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
10009    const EXTRA_CRC: u8 = 29u8;
10010    const ENCODED_LEN: usize = 13usize;
10011    fn deser(
10012        _version: MavlinkVersion,
10013        __input: &[u8],
10014    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10015        let avail_len = __input.len();
10016        let mut payload_buf = [0; Self::ENCODED_LEN];
10017        let mut buf = if avail_len < Self::ENCODED_LEN {
10018            payload_buf[0..avail_len].copy_from_slice(__input);
10019            Bytes::new(&payload_buf)
10020        } else {
10021            Bytes::new(__input)
10022        };
10023        let mut __struct = Self::default();
10024        __struct.size = buf.get_u32_le();
10025        __struct.width = buf.get_u16_le();
10026        __struct.height = buf.get_u16_le();
10027        __struct.packets = buf.get_u16_le();
10028        let tmp = buf.get_u8();
10029        __struct.mavtype =
10030            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10031                enum_type: "MavlinkDataStreamType",
10032                value: tmp as u32,
10033            })?;
10034        __struct.payload = buf.get_u8();
10035        __struct.jpg_quality = buf.get_u8();
10036        Ok(__struct)
10037    }
10038    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10039        let mut __tmp = BytesMut::new(bytes);
10040        #[allow(clippy::absurd_extreme_comparisons)]
10041        #[allow(unused_comparisons)]
10042        if __tmp.remaining() < Self::ENCODED_LEN {
10043            panic!(
10044                "buffer is too small (need {} bytes, but got {})",
10045                Self::ENCODED_LEN,
10046                __tmp.remaining(),
10047            )
10048        }
10049        __tmp.put_u32_le(self.size);
10050        __tmp.put_u16_le(self.width);
10051        __tmp.put_u16_le(self.height);
10052        __tmp.put_u16_le(self.packets);
10053        __tmp.put_u8(self.mavtype as u8);
10054        __tmp.put_u8(self.payload);
10055        __tmp.put_u8(self.jpg_quality);
10056        if matches!(version, MavlinkVersion::V2) {
10057            let len = __tmp.len();
10058            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10059        } else {
10060            __tmp.len()
10061        }
10062    }
10063}
10064#[doc = "id: 254"]
10065#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
10066#[derive(Debug, Clone, PartialEq)]
10067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10069pub struct DEBUG_DATA {
10070    #[doc = "Timestamp (time since system boot)."]
10071    pub time_boot_ms: u32,
10072    #[doc = "DEBUG value"]
10073    pub value: f32,
10074    #[doc = "index of debug variable"]
10075    pub ind: u8,
10076}
10077impl DEBUG_DATA {
10078    pub const ENCODED_LEN: usize = 9usize;
10079    pub const DEFAULT: Self = Self {
10080        time_boot_ms: 0_u32,
10081        value: 0.0_f32,
10082        ind: 0_u8,
10083    };
10084    #[cfg(feature = "arbitrary")]
10085    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10086        use arbitrary::{Arbitrary, Unstructured};
10087        let mut buf = [0u8; 1024];
10088        rng.fill_bytes(&mut buf);
10089        let mut unstructured = Unstructured::new(&buf);
10090        Self::arbitrary(&mut unstructured).unwrap_or_default()
10091    }
10092}
10093impl Default for DEBUG_DATA {
10094    fn default() -> Self {
10095        Self::DEFAULT.clone()
10096    }
10097}
10098impl MessageData for DEBUG_DATA {
10099    type Message = MavMessage;
10100    const ID: u32 = 254u32;
10101    const NAME: &'static str = "DEBUG";
10102    const EXTRA_CRC: u8 = 46u8;
10103    const ENCODED_LEN: usize = 9usize;
10104    fn deser(
10105        _version: MavlinkVersion,
10106        __input: &[u8],
10107    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10108        let avail_len = __input.len();
10109        let mut payload_buf = [0; Self::ENCODED_LEN];
10110        let mut buf = if avail_len < Self::ENCODED_LEN {
10111            payload_buf[0..avail_len].copy_from_slice(__input);
10112            Bytes::new(&payload_buf)
10113        } else {
10114            Bytes::new(__input)
10115        };
10116        let mut __struct = Self::default();
10117        __struct.time_boot_ms = buf.get_u32_le();
10118        __struct.value = buf.get_f32_le();
10119        __struct.ind = buf.get_u8();
10120        Ok(__struct)
10121    }
10122    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10123        let mut __tmp = BytesMut::new(bytes);
10124        #[allow(clippy::absurd_extreme_comparisons)]
10125        #[allow(unused_comparisons)]
10126        if __tmp.remaining() < Self::ENCODED_LEN {
10127            panic!(
10128                "buffer is too small (need {} bytes, but got {})",
10129                Self::ENCODED_LEN,
10130                __tmp.remaining(),
10131            )
10132        }
10133        __tmp.put_u32_le(self.time_boot_ms);
10134        __tmp.put_f32_le(self.value);
10135        __tmp.put_u8(self.ind);
10136        if matches!(version, MavlinkVersion::V2) {
10137            let len = __tmp.len();
10138            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10139        } else {
10140            __tmp.len()
10141        }
10142    }
10143}
10144#[doc = "id: 350"]
10145#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
10146#[derive(Debug, Clone, PartialEq)]
10147#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10148#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10149pub struct DEBUG_FLOAT_ARRAY_DATA {
10150    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10151    pub time_usec: u64,
10152    #[doc = "Unique ID used to discriminate between arrays"]
10153    pub array_id: u16,
10154    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10155    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10156    pub name: [u8; 10],
10157    #[doc = "data"]
10158    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10159    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10160    pub data: [f32; 58],
10161}
10162impl DEBUG_FLOAT_ARRAY_DATA {
10163    pub const ENCODED_LEN: usize = 252usize;
10164    pub const DEFAULT: Self = Self {
10165        time_usec: 0_u64,
10166        array_id: 0_u16,
10167        name: [0_u8; 10usize],
10168        data: [0.0_f32; 58usize],
10169    };
10170    #[cfg(feature = "arbitrary")]
10171    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10172        use arbitrary::{Arbitrary, Unstructured};
10173        let mut buf = [0u8; 1024];
10174        rng.fill_bytes(&mut buf);
10175        let mut unstructured = Unstructured::new(&buf);
10176        Self::arbitrary(&mut unstructured).unwrap_or_default()
10177    }
10178}
10179impl Default for DEBUG_FLOAT_ARRAY_DATA {
10180    fn default() -> Self {
10181        Self::DEFAULT.clone()
10182    }
10183}
10184impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10185    type Message = MavMessage;
10186    const ID: u32 = 350u32;
10187    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10188    const EXTRA_CRC: u8 = 232u8;
10189    const ENCODED_LEN: usize = 252usize;
10190    fn deser(
10191        _version: MavlinkVersion,
10192        __input: &[u8],
10193    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10194        let avail_len = __input.len();
10195        let mut payload_buf = [0; Self::ENCODED_LEN];
10196        let mut buf = if avail_len < Self::ENCODED_LEN {
10197            payload_buf[0..avail_len].copy_from_slice(__input);
10198            Bytes::new(&payload_buf)
10199        } else {
10200            Bytes::new(__input)
10201        };
10202        let mut __struct = Self::default();
10203        __struct.time_usec = buf.get_u64_le();
10204        __struct.array_id = buf.get_u16_le();
10205        for v in &mut __struct.name {
10206            let val = buf.get_u8();
10207            *v = val;
10208        }
10209        for v in &mut __struct.data {
10210            let val = buf.get_f32_le();
10211            *v = val;
10212        }
10213        Ok(__struct)
10214    }
10215    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10216        let mut __tmp = BytesMut::new(bytes);
10217        #[allow(clippy::absurd_extreme_comparisons)]
10218        #[allow(unused_comparisons)]
10219        if __tmp.remaining() < Self::ENCODED_LEN {
10220            panic!(
10221                "buffer is too small (need {} bytes, but got {})",
10222                Self::ENCODED_LEN,
10223                __tmp.remaining(),
10224            )
10225        }
10226        __tmp.put_u64_le(self.time_usec);
10227        __tmp.put_u16_le(self.array_id);
10228        for val in &self.name {
10229            __tmp.put_u8(*val);
10230        }
10231        for val in &self.data {
10232            __tmp.put_f32_le(*val);
10233        }
10234        if matches!(version, MavlinkVersion::V2) {
10235            let len = __tmp.len();
10236            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10237        } else {
10238            __tmp.len()
10239        }
10240    }
10241}
10242#[doc = "id: 250"]
10243#[doc = "To debug something using a named 3D vector."]
10244#[derive(Debug, Clone, PartialEq)]
10245#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10246#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10247pub struct DEBUG_VECT_DATA {
10248    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10249    pub time_usec: u64,
10250    #[doc = "x"]
10251    pub x: f32,
10252    #[doc = "y"]
10253    pub y: f32,
10254    #[doc = "z"]
10255    pub z: f32,
10256    #[doc = "Name"]
10257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10258    pub name: [u8; 10],
10259}
10260impl DEBUG_VECT_DATA {
10261    pub const ENCODED_LEN: usize = 30usize;
10262    pub const DEFAULT: Self = Self {
10263        time_usec: 0_u64,
10264        x: 0.0_f32,
10265        y: 0.0_f32,
10266        z: 0.0_f32,
10267        name: [0_u8; 10usize],
10268    };
10269    #[cfg(feature = "arbitrary")]
10270    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10271        use arbitrary::{Arbitrary, Unstructured};
10272        let mut buf = [0u8; 1024];
10273        rng.fill_bytes(&mut buf);
10274        let mut unstructured = Unstructured::new(&buf);
10275        Self::arbitrary(&mut unstructured).unwrap_or_default()
10276    }
10277}
10278impl Default for DEBUG_VECT_DATA {
10279    fn default() -> Self {
10280        Self::DEFAULT.clone()
10281    }
10282}
10283impl MessageData for DEBUG_VECT_DATA {
10284    type Message = MavMessage;
10285    const ID: u32 = 250u32;
10286    const NAME: &'static str = "DEBUG_VECT";
10287    const EXTRA_CRC: u8 = 49u8;
10288    const ENCODED_LEN: usize = 30usize;
10289    fn deser(
10290        _version: MavlinkVersion,
10291        __input: &[u8],
10292    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10293        let avail_len = __input.len();
10294        let mut payload_buf = [0; Self::ENCODED_LEN];
10295        let mut buf = if avail_len < Self::ENCODED_LEN {
10296            payload_buf[0..avail_len].copy_from_slice(__input);
10297            Bytes::new(&payload_buf)
10298        } else {
10299            Bytes::new(__input)
10300        };
10301        let mut __struct = Self::default();
10302        __struct.time_usec = buf.get_u64_le();
10303        __struct.x = buf.get_f32_le();
10304        __struct.y = buf.get_f32_le();
10305        __struct.z = buf.get_f32_le();
10306        for v in &mut __struct.name {
10307            let val = buf.get_u8();
10308            *v = val;
10309        }
10310        Ok(__struct)
10311    }
10312    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10313        let mut __tmp = BytesMut::new(bytes);
10314        #[allow(clippy::absurd_extreme_comparisons)]
10315        #[allow(unused_comparisons)]
10316        if __tmp.remaining() < Self::ENCODED_LEN {
10317            panic!(
10318                "buffer is too small (need {} bytes, but got {})",
10319                Self::ENCODED_LEN,
10320                __tmp.remaining(),
10321            )
10322        }
10323        __tmp.put_u64_le(self.time_usec);
10324        __tmp.put_f32_le(self.x);
10325        __tmp.put_f32_le(self.y);
10326        __tmp.put_f32_le(self.z);
10327        for val in &self.name {
10328            __tmp.put_u8(*val);
10329        }
10330        if matches!(version, MavlinkVersion::V2) {
10331            let len = __tmp.len();
10332            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10333        } else {
10334            __tmp.len()
10335        }
10336    }
10337}
10338#[doc = "id: 132"]
10339#[doc = "Distance sensor information for an onboard rangefinder."]
10340#[derive(Debug, Clone, PartialEq)]
10341#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10342#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10343pub struct DISTANCE_SENSOR_DATA {
10344    #[doc = "Timestamp (time since system boot)."]
10345    pub time_boot_ms: u32,
10346    #[doc = "Minimum distance the sensor can measure"]
10347    pub min_distance: u16,
10348    #[doc = "Maximum distance the sensor can measure"]
10349    pub max_distance: u16,
10350    #[doc = "Current distance reading"]
10351    pub current_distance: u16,
10352    #[doc = "Type of distance sensor."]
10353    pub mavtype: MavDistanceSensor,
10354    #[doc = "Onboard ID of the sensor"]
10355    pub id: u8,
10356    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10357    pub orientation: MavSensorOrientation,
10358    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10359    pub covariance: u8,
10360    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10361    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10362    pub horizontal_fov: f32,
10363    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10364    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10365    pub vertical_fov: f32,
10366    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10367    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10369    pub quaternion: [f32; 4],
10370    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10371    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10372    pub signal_quality: u8,
10373}
10374impl DISTANCE_SENSOR_DATA {
10375    pub const ENCODED_LEN: usize = 39usize;
10376    pub const DEFAULT: Self = Self {
10377        time_boot_ms: 0_u32,
10378        min_distance: 0_u16,
10379        max_distance: 0_u16,
10380        current_distance: 0_u16,
10381        mavtype: MavDistanceSensor::DEFAULT,
10382        id: 0_u8,
10383        orientation: MavSensorOrientation::DEFAULT,
10384        covariance: 0_u8,
10385        horizontal_fov: 0.0_f32,
10386        vertical_fov: 0.0_f32,
10387        quaternion: [0.0_f32; 4usize],
10388        signal_quality: 0_u8,
10389    };
10390    #[cfg(feature = "arbitrary")]
10391    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10392        use arbitrary::{Arbitrary, Unstructured};
10393        let mut buf = [0u8; 1024];
10394        rng.fill_bytes(&mut buf);
10395        let mut unstructured = Unstructured::new(&buf);
10396        Self::arbitrary(&mut unstructured).unwrap_or_default()
10397    }
10398}
10399impl Default for DISTANCE_SENSOR_DATA {
10400    fn default() -> Self {
10401        Self::DEFAULT.clone()
10402    }
10403}
10404impl MessageData for DISTANCE_SENSOR_DATA {
10405    type Message = MavMessage;
10406    const ID: u32 = 132u32;
10407    const NAME: &'static str = "DISTANCE_SENSOR";
10408    const EXTRA_CRC: u8 = 85u8;
10409    const ENCODED_LEN: usize = 39usize;
10410    fn deser(
10411        _version: MavlinkVersion,
10412        __input: &[u8],
10413    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10414        let avail_len = __input.len();
10415        let mut payload_buf = [0; Self::ENCODED_LEN];
10416        let mut buf = if avail_len < Self::ENCODED_LEN {
10417            payload_buf[0..avail_len].copy_from_slice(__input);
10418            Bytes::new(&payload_buf)
10419        } else {
10420            Bytes::new(__input)
10421        };
10422        let mut __struct = Self::default();
10423        __struct.time_boot_ms = buf.get_u32_le();
10424        __struct.min_distance = buf.get_u16_le();
10425        __struct.max_distance = buf.get_u16_le();
10426        __struct.current_distance = buf.get_u16_le();
10427        let tmp = buf.get_u8();
10428        __struct.mavtype =
10429            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10430                enum_type: "MavDistanceSensor",
10431                value: tmp as u32,
10432            })?;
10433        __struct.id = buf.get_u8();
10434        let tmp = buf.get_u8();
10435        __struct.orientation =
10436            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10437                enum_type: "MavSensorOrientation",
10438                value: tmp as u32,
10439            })?;
10440        __struct.covariance = buf.get_u8();
10441        __struct.horizontal_fov = buf.get_f32_le();
10442        __struct.vertical_fov = buf.get_f32_le();
10443        for v in &mut __struct.quaternion {
10444            let val = buf.get_f32_le();
10445            *v = val;
10446        }
10447        __struct.signal_quality = buf.get_u8();
10448        Ok(__struct)
10449    }
10450    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10451        let mut __tmp = BytesMut::new(bytes);
10452        #[allow(clippy::absurd_extreme_comparisons)]
10453        #[allow(unused_comparisons)]
10454        if __tmp.remaining() < Self::ENCODED_LEN {
10455            panic!(
10456                "buffer is too small (need {} bytes, but got {})",
10457                Self::ENCODED_LEN,
10458                __tmp.remaining(),
10459            )
10460        }
10461        __tmp.put_u32_le(self.time_boot_ms);
10462        __tmp.put_u16_le(self.min_distance);
10463        __tmp.put_u16_le(self.max_distance);
10464        __tmp.put_u16_le(self.current_distance);
10465        __tmp.put_u8(self.mavtype as u8);
10466        __tmp.put_u8(self.id);
10467        __tmp.put_u8(self.orientation as u8);
10468        __tmp.put_u8(self.covariance);
10469        __tmp.put_f32_le(self.horizontal_fov);
10470        __tmp.put_f32_le(self.vertical_fov);
10471        for val in &self.quaternion {
10472            __tmp.put_f32_le(*val);
10473        }
10474        __tmp.put_u8(self.signal_quality);
10475        if matches!(version, MavlinkVersion::V2) {
10476            let len = __tmp.len();
10477            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10478        } else {
10479            __tmp.len()
10480        }
10481    }
10482}
10483#[doc = "id: 225"]
10484#[doc = "EFI status output."]
10485#[derive(Debug, Clone, PartialEq)]
10486#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10487#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10488pub struct EFI_STATUS_DATA {
10489    #[doc = "ECU index"]
10490    pub ecu_index: f32,
10491    #[doc = "RPM"]
10492    pub rpm: f32,
10493    #[doc = "Fuel consumed"]
10494    pub fuel_consumed: f32,
10495    #[doc = "Fuel flow rate"]
10496    pub fuel_flow: f32,
10497    #[doc = "Engine load"]
10498    pub engine_load: f32,
10499    #[doc = "Throttle position"]
10500    pub throttle_position: f32,
10501    #[doc = "Spark dwell time"]
10502    pub spark_dwell_time: f32,
10503    #[doc = "Barometric pressure"]
10504    pub barometric_pressure: f32,
10505    #[doc = "Intake manifold pressure("]
10506    pub intake_manifold_pressure: f32,
10507    #[doc = "Intake manifold temperature"]
10508    pub intake_manifold_temperature: f32,
10509    #[doc = "Cylinder head temperature"]
10510    pub cylinder_head_temperature: f32,
10511    #[doc = "Ignition timing (Crank angle degrees)"]
10512    pub ignition_timing: f32,
10513    #[doc = "Injection time"]
10514    pub injection_time: f32,
10515    #[doc = "Exhaust gas temperature"]
10516    pub exhaust_gas_temperature: f32,
10517    #[doc = "Output throttle"]
10518    pub throttle_out: f32,
10519    #[doc = "Pressure/temperature compensation"]
10520    pub pt_compensation: f32,
10521    #[doc = "EFI health status"]
10522    pub health: u8,
10523    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10524    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10525    pub ignition_voltage: f32,
10526    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10528    pub fuel_pressure: f32,
10529}
10530impl EFI_STATUS_DATA {
10531    pub const ENCODED_LEN: usize = 73usize;
10532    pub const DEFAULT: Self = Self {
10533        ecu_index: 0.0_f32,
10534        rpm: 0.0_f32,
10535        fuel_consumed: 0.0_f32,
10536        fuel_flow: 0.0_f32,
10537        engine_load: 0.0_f32,
10538        throttle_position: 0.0_f32,
10539        spark_dwell_time: 0.0_f32,
10540        barometric_pressure: 0.0_f32,
10541        intake_manifold_pressure: 0.0_f32,
10542        intake_manifold_temperature: 0.0_f32,
10543        cylinder_head_temperature: 0.0_f32,
10544        ignition_timing: 0.0_f32,
10545        injection_time: 0.0_f32,
10546        exhaust_gas_temperature: 0.0_f32,
10547        throttle_out: 0.0_f32,
10548        pt_compensation: 0.0_f32,
10549        health: 0_u8,
10550        ignition_voltage: 0.0_f32,
10551        fuel_pressure: 0.0_f32,
10552    };
10553    #[cfg(feature = "arbitrary")]
10554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10555        use arbitrary::{Arbitrary, Unstructured};
10556        let mut buf = [0u8; 1024];
10557        rng.fill_bytes(&mut buf);
10558        let mut unstructured = Unstructured::new(&buf);
10559        Self::arbitrary(&mut unstructured).unwrap_or_default()
10560    }
10561}
10562impl Default for EFI_STATUS_DATA {
10563    fn default() -> Self {
10564        Self::DEFAULT.clone()
10565    }
10566}
10567impl MessageData for EFI_STATUS_DATA {
10568    type Message = MavMessage;
10569    const ID: u32 = 225u32;
10570    const NAME: &'static str = "EFI_STATUS";
10571    const EXTRA_CRC: u8 = 208u8;
10572    const ENCODED_LEN: usize = 73usize;
10573    fn deser(
10574        _version: MavlinkVersion,
10575        __input: &[u8],
10576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10577        let avail_len = __input.len();
10578        let mut payload_buf = [0; Self::ENCODED_LEN];
10579        let mut buf = if avail_len < Self::ENCODED_LEN {
10580            payload_buf[0..avail_len].copy_from_slice(__input);
10581            Bytes::new(&payload_buf)
10582        } else {
10583            Bytes::new(__input)
10584        };
10585        let mut __struct = Self::default();
10586        __struct.ecu_index = buf.get_f32_le();
10587        __struct.rpm = buf.get_f32_le();
10588        __struct.fuel_consumed = buf.get_f32_le();
10589        __struct.fuel_flow = buf.get_f32_le();
10590        __struct.engine_load = buf.get_f32_le();
10591        __struct.throttle_position = buf.get_f32_le();
10592        __struct.spark_dwell_time = buf.get_f32_le();
10593        __struct.barometric_pressure = buf.get_f32_le();
10594        __struct.intake_manifold_pressure = buf.get_f32_le();
10595        __struct.intake_manifold_temperature = buf.get_f32_le();
10596        __struct.cylinder_head_temperature = buf.get_f32_le();
10597        __struct.ignition_timing = buf.get_f32_le();
10598        __struct.injection_time = buf.get_f32_le();
10599        __struct.exhaust_gas_temperature = buf.get_f32_le();
10600        __struct.throttle_out = buf.get_f32_le();
10601        __struct.pt_compensation = buf.get_f32_le();
10602        __struct.health = buf.get_u8();
10603        __struct.ignition_voltage = buf.get_f32_le();
10604        __struct.fuel_pressure = buf.get_f32_le();
10605        Ok(__struct)
10606    }
10607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10608        let mut __tmp = BytesMut::new(bytes);
10609        #[allow(clippy::absurd_extreme_comparisons)]
10610        #[allow(unused_comparisons)]
10611        if __tmp.remaining() < Self::ENCODED_LEN {
10612            panic!(
10613                "buffer is too small (need {} bytes, but got {})",
10614                Self::ENCODED_LEN,
10615                __tmp.remaining(),
10616            )
10617        }
10618        __tmp.put_f32_le(self.ecu_index);
10619        __tmp.put_f32_le(self.rpm);
10620        __tmp.put_f32_le(self.fuel_consumed);
10621        __tmp.put_f32_le(self.fuel_flow);
10622        __tmp.put_f32_le(self.engine_load);
10623        __tmp.put_f32_le(self.throttle_position);
10624        __tmp.put_f32_le(self.spark_dwell_time);
10625        __tmp.put_f32_le(self.barometric_pressure);
10626        __tmp.put_f32_le(self.intake_manifold_pressure);
10627        __tmp.put_f32_le(self.intake_manifold_temperature);
10628        __tmp.put_f32_le(self.cylinder_head_temperature);
10629        __tmp.put_f32_le(self.ignition_timing);
10630        __tmp.put_f32_le(self.injection_time);
10631        __tmp.put_f32_le(self.exhaust_gas_temperature);
10632        __tmp.put_f32_le(self.throttle_out);
10633        __tmp.put_f32_le(self.pt_compensation);
10634        __tmp.put_u8(self.health);
10635        __tmp.put_f32_le(self.ignition_voltage);
10636        __tmp.put_f32_le(self.fuel_pressure);
10637        if matches!(version, MavlinkVersion::V2) {
10638            let len = __tmp.len();
10639            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10640        } else {
10641            __tmp.len()
10642        }
10643    }
10644}
10645#[doc = "id: 131"]
10646#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10647#[derive(Debug, Clone, PartialEq)]
10648#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10649#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10650pub struct ENCAPSULATED_DATA_DATA {
10651    #[doc = "sequence number (starting with 0 on every transmission)"]
10652    pub seqnr: u16,
10653    #[doc = "image data bytes"]
10654    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10655    pub data: [u8; 253],
10656}
10657impl ENCAPSULATED_DATA_DATA {
10658    pub const ENCODED_LEN: usize = 255usize;
10659    pub const DEFAULT: Self = Self {
10660        seqnr: 0_u16,
10661        data: [0_u8; 253usize],
10662    };
10663    #[cfg(feature = "arbitrary")]
10664    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10665        use arbitrary::{Arbitrary, Unstructured};
10666        let mut buf = [0u8; 1024];
10667        rng.fill_bytes(&mut buf);
10668        let mut unstructured = Unstructured::new(&buf);
10669        Self::arbitrary(&mut unstructured).unwrap_or_default()
10670    }
10671}
10672impl Default for ENCAPSULATED_DATA_DATA {
10673    fn default() -> Self {
10674        Self::DEFAULT.clone()
10675    }
10676}
10677impl MessageData for ENCAPSULATED_DATA_DATA {
10678    type Message = MavMessage;
10679    const ID: u32 = 131u32;
10680    const NAME: &'static str = "ENCAPSULATED_DATA";
10681    const EXTRA_CRC: u8 = 223u8;
10682    const ENCODED_LEN: usize = 255usize;
10683    fn deser(
10684        _version: MavlinkVersion,
10685        __input: &[u8],
10686    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10687        let avail_len = __input.len();
10688        let mut payload_buf = [0; Self::ENCODED_LEN];
10689        let mut buf = if avail_len < Self::ENCODED_LEN {
10690            payload_buf[0..avail_len].copy_from_slice(__input);
10691            Bytes::new(&payload_buf)
10692        } else {
10693            Bytes::new(__input)
10694        };
10695        let mut __struct = Self::default();
10696        __struct.seqnr = buf.get_u16_le();
10697        for v in &mut __struct.data {
10698            let val = buf.get_u8();
10699            *v = val;
10700        }
10701        Ok(__struct)
10702    }
10703    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10704        let mut __tmp = BytesMut::new(bytes);
10705        #[allow(clippy::absurd_extreme_comparisons)]
10706        #[allow(unused_comparisons)]
10707        if __tmp.remaining() < Self::ENCODED_LEN {
10708            panic!(
10709                "buffer is too small (need {} bytes, but got {})",
10710                Self::ENCODED_LEN,
10711                __tmp.remaining(),
10712            )
10713        }
10714        __tmp.put_u16_le(self.seqnr);
10715        for val in &self.data {
10716            __tmp.put_u8(*val);
10717        }
10718        if matches!(version, MavlinkVersion::V2) {
10719            let len = __tmp.len();
10720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10721        } else {
10722            __tmp.len()
10723        }
10724    }
10725}
10726#[doc = "id: 290"]
10727#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10728#[derive(Debug, Clone, PartialEq)]
10729#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10730#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10731pub struct ESC_INFO_DATA {
10732    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10733    pub time_usec: u64,
10734    #[doc = "Number of reported errors by each ESC since boot."]
10735    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10736    pub error_count: [u32; 4],
10737    #[doc = "Counter of data packets received."]
10738    pub counter: u16,
10739    #[doc = "Bitmap of ESC failure flags."]
10740    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10741    pub failure_flags: [u16; 4],
10742    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10743    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10744    pub temperature: [i16; 4],
10745    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10746    pub index: u8,
10747    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10748    pub count: u8,
10749    #[doc = "Connection type protocol for all ESC."]
10750    pub connection_type: EscConnectionType,
10751    #[doc = "Information regarding online/offline status of each ESC."]
10752    pub info: u8,
10753}
10754impl ESC_INFO_DATA {
10755    pub const ENCODED_LEN: usize = 46usize;
10756    pub const DEFAULT: Self = Self {
10757        time_usec: 0_u64,
10758        error_count: [0_u32; 4usize],
10759        counter: 0_u16,
10760        failure_flags: [0_u16; 4usize],
10761        temperature: [0_i16; 4usize],
10762        index: 0_u8,
10763        count: 0_u8,
10764        connection_type: EscConnectionType::DEFAULT,
10765        info: 0_u8,
10766    };
10767    #[cfg(feature = "arbitrary")]
10768    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10769        use arbitrary::{Arbitrary, Unstructured};
10770        let mut buf = [0u8; 1024];
10771        rng.fill_bytes(&mut buf);
10772        let mut unstructured = Unstructured::new(&buf);
10773        Self::arbitrary(&mut unstructured).unwrap_or_default()
10774    }
10775}
10776impl Default for ESC_INFO_DATA {
10777    fn default() -> Self {
10778        Self::DEFAULT.clone()
10779    }
10780}
10781impl MessageData for ESC_INFO_DATA {
10782    type Message = MavMessage;
10783    const ID: u32 = 290u32;
10784    const NAME: &'static str = "ESC_INFO";
10785    const EXTRA_CRC: u8 = 251u8;
10786    const ENCODED_LEN: usize = 46usize;
10787    fn deser(
10788        _version: MavlinkVersion,
10789        __input: &[u8],
10790    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10791        let avail_len = __input.len();
10792        let mut payload_buf = [0; Self::ENCODED_LEN];
10793        let mut buf = if avail_len < Self::ENCODED_LEN {
10794            payload_buf[0..avail_len].copy_from_slice(__input);
10795            Bytes::new(&payload_buf)
10796        } else {
10797            Bytes::new(__input)
10798        };
10799        let mut __struct = Self::default();
10800        __struct.time_usec = buf.get_u64_le();
10801        for v in &mut __struct.error_count {
10802            let val = buf.get_u32_le();
10803            *v = val;
10804        }
10805        __struct.counter = buf.get_u16_le();
10806        for v in &mut __struct.failure_flags {
10807            let val = buf.get_u16_le();
10808            *v = val;
10809        }
10810        for v in &mut __struct.temperature {
10811            let val = buf.get_i16_le();
10812            *v = val;
10813        }
10814        __struct.index = buf.get_u8();
10815        __struct.count = buf.get_u8();
10816        let tmp = buf.get_u8();
10817        __struct.connection_type =
10818            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10819                enum_type: "EscConnectionType",
10820                value: tmp as u32,
10821            })?;
10822        __struct.info = buf.get_u8();
10823        Ok(__struct)
10824    }
10825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10826        let mut __tmp = BytesMut::new(bytes);
10827        #[allow(clippy::absurd_extreme_comparisons)]
10828        #[allow(unused_comparisons)]
10829        if __tmp.remaining() < Self::ENCODED_LEN {
10830            panic!(
10831                "buffer is too small (need {} bytes, but got {})",
10832                Self::ENCODED_LEN,
10833                __tmp.remaining(),
10834            )
10835        }
10836        __tmp.put_u64_le(self.time_usec);
10837        for val in &self.error_count {
10838            __tmp.put_u32_le(*val);
10839        }
10840        __tmp.put_u16_le(self.counter);
10841        for val in &self.failure_flags {
10842            __tmp.put_u16_le(*val);
10843        }
10844        for val in &self.temperature {
10845            __tmp.put_i16_le(*val);
10846        }
10847        __tmp.put_u8(self.index);
10848        __tmp.put_u8(self.count);
10849        __tmp.put_u8(self.connection_type as u8);
10850        __tmp.put_u8(self.info);
10851        if matches!(version, MavlinkVersion::V2) {
10852            let len = __tmp.len();
10853            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10854        } else {
10855            __tmp.len()
10856        }
10857    }
10858}
10859#[doc = "id: 291"]
10860#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
10861#[derive(Debug, Clone, PartialEq)]
10862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10863#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10864pub struct ESC_STATUS_DATA {
10865    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10866    pub time_usec: u64,
10867    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
10868    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10869    pub rpm: [i32; 4],
10870    #[doc = "Voltage measured from each ESC."]
10871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10872    pub voltage: [f32; 4],
10873    #[doc = "Current measured from each ESC."]
10874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10875    pub current: [f32; 4],
10876    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10877    pub index: u8,
10878}
10879impl ESC_STATUS_DATA {
10880    pub const ENCODED_LEN: usize = 57usize;
10881    pub const DEFAULT: Self = Self {
10882        time_usec: 0_u64,
10883        rpm: [0_i32; 4usize],
10884        voltage: [0.0_f32; 4usize],
10885        current: [0.0_f32; 4usize],
10886        index: 0_u8,
10887    };
10888    #[cfg(feature = "arbitrary")]
10889    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10890        use arbitrary::{Arbitrary, Unstructured};
10891        let mut buf = [0u8; 1024];
10892        rng.fill_bytes(&mut buf);
10893        let mut unstructured = Unstructured::new(&buf);
10894        Self::arbitrary(&mut unstructured).unwrap_or_default()
10895    }
10896}
10897impl Default for ESC_STATUS_DATA {
10898    fn default() -> Self {
10899        Self::DEFAULT.clone()
10900    }
10901}
10902impl MessageData for ESC_STATUS_DATA {
10903    type Message = MavMessage;
10904    const ID: u32 = 291u32;
10905    const NAME: &'static str = "ESC_STATUS";
10906    const EXTRA_CRC: u8 = 10u8;
10907    const ENCODED_LEN: usize = 57usize;
10908    fn deser(
10909        _version: MavlinkVersion,
10910        __input: &[u8],
10911    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10912        let avail_len = __input.len();
10913        let mut payload_buf = [0; Self::ENCODED_LEN];
10914        let mut buf = if avail_len < Self::ENCODED_LEN {
10915            payload_buf[0..avail_len].copy_from_slice(__input);
10916            Bytes::new(&payload_buf)
10917        } else {
10918            Bytes::new(__input)
10919        };
10920        let mut __struct = Self::default();
10921        __struct.time_usec = buf.get_u64_le();
10922        for v in &mut __struct.rpm {
10923            let val = buf.get_i32_le();
10924            *v = val;
10925        }
10926        for v in &mut __struct.voltage {
10927            let val = buf.get_f32_le();
10928            *v = val;
10929        }
10930        for v in &mut __struct.current {
10931            let val = buf.get_f32_le();
10932            *v = val;
10933        }
10934        __struct.index = buf.get_u8();
10935        Ok(__struct)
10936    }
10937    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10938        let mut __tmp = BytesMut::new(bytes);
10939        #[allow(clippy::absurd_extreme_comparisons)]
10940        #[allow(unused_comparisons)]
10941        if __tmp.remaining() < Self::ENCODED_LEN {
10942            panic!(
10943                "buffer is too small (need {} bytes, but got {})",
10944                Self::ENCODED_LEN,
10945                __tmp.remaining(),
10946            )
10947        }
10948        __tmp.put_u64_le(self.time_usec);
10949        for val in &self.rpm {
10950            __tmp.put_i32_le(*val);
10951        }
10952        for val in &self.voltage {
10953            __tmp.put_f32_le(*val);
10954        }
10955        for val in &self.current {
10956            __tmp.put_f32_le(*val);
10957        }
10958        __tmp.put_u8(self.index);
10959        if matches!(version, MavlinkVersion::V2) {
10960            let len = __tmp.len();
10961            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10962        } else {
10963            __tmp.len()
10964        }
10965    }
10966}
10967#[doc = "id: 230"]
10968#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
10969#[derive(Debug, Clone, PartialEq)]
10970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10971#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10972pub struct ESTIMATOR_STATUS_DATA {
10973    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10974    pub time_usec: u64,
10975    #[doc = "Velocity innovation test ratio"]
10976    pub vel_ratio: f32,
10977    #[doc = "Horizontal position innovation test ratio"]
10978    pub pos_horiz_ratio: f32,
10979    #[doc = "Vertical position innovation test ratio"]
10980    pub pos_vert_ratio: f32,
10981    #[doc = "Magnetometer innovation test ratio"]
10982    pub mag_ratio: f32,
10983    #[doc = "Height above terrain innovation test ratio"]
10984    pub hagl_ratio: f32,
10985    #[doc = "True airspeed innovation test ratio"]
10986    pub tas_ratio: f32,
10987    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
10988    pub pos_horiz_accuracy: f32,
10989    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
10990    pub pos_vert_accuracy: f32,
10991    #[doc = "Bitmap indicating which EKF outputs are valid."]
10992    pub flags: EstimatorStatusFlags,
10993}
10994impl ESTIMATOR_STATUS_DATA {
10995    pub const ENCODED_LEN: usize = 42usize;
10996    pub const DEFAULT: Self = Self {
10997        time_usec: 0_u64,
10998        vel_ratio: 0.0_f32,
10999        pos_horiz_ratio: 0.0_f32,
11000        pos_vert_ratio: 0.0_f32,
11001        mag_ratio: 0.0_f32,
11002        hagl_ratio: 0.0_f32,
11003        tas_ratio: 0.0_f32,
11004        pos_horiz_accuracy: 0.0_f32,
11005        pos_vert_accuracy: 0.0_f32,
11006        flags: EstimatorStatusFlags::DEFAULT,
11007    };
11008    #[cfg(feature = "arbitrary")]
11009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11010        use arbitrary::{Arbitrary, Unstructured};
11011        let mut buf = [0u8; 1024];
11012        rng.fill_bytes(&mut buf);
11013        let mut unstructured = Unstructured::new(&buf);
11014        Self::arbitrary(&mut unstructured).unwrap_or_default()
11015    }
11016}
11017impl Default for ESTIMATOR_STATUS_DATA {
11018    fn default() -> Self {
11019        Self::DEFAULT.clone()
11020    }
11021}
11022impl MessageData for ESTIMATOR_STATUS_DATA {
11023    type Message = MavMessage;
11024    const ID: u32 = 230u32;
11025    const NAME: &'static str = "ESTIMATOR_STATUS";
11026    const EXTRA_CRC: u8 = 163u8;
11027    const ENCODED_LEN: usize = 42usize;
11028    fn deser(
11029        _version: MavlinkVersion,
11030        __input: &[u8],
11031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11032        let avail_len = __input.len();
11033        let mut payload_buf = [0; Self::ENCODED_LEN];
11034        let mut buf = if avail_len < Self::ENCODED_LEN {
11035            payload_buf[0..avail_len].copy_from_slice(__input);
11036            Bytes::new(&payload_buf)
11037        } else {
11038            Bytes::new(__input)
11039        };
11040        let mut __struct = Self::default();
11041        __struct.time_usec = buf.get_u64_le();
11042        __struct.vel_ratio = buf.get_f32_le();
11043        __struct.pos_horiz_ratio = buf.get_f32_le();
11044        __struct.pos_vert_ratio = buf.get_f32_le();
11045        __struct.mag_ratio = buf.get_f32_le();
11046        __struct.hagl_ratio = buf.get_f32_le();
11047        __struct.tas_ratio = buf.get_f32_le();
11048        __struct.pos_horiz_accuracy = buf.get_f32_le();
11049        __struct.pos_vert_accuracy = buf.get_f32_le();
11050        let tmp = buf.get_u16_le();
11051        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
11052            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11053                flag_type: "EstimatorStatusFlags",
11054                value: tmp as u32,
11055            })?;
11056        Ok(__struct)
11057    }
11058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11059        let mut __tmp = BytesMut::new(bytes);
11060        #[allow(clippy::absurd_extreme_comparisons)]
11061        #[allow(unused_comparisons)]
11062        if __tmp.remaining() < Self::ENCODED_LEN {
11063            panic!(
11064                "buffer is too small (need {} bytes, but got {})",
11065                Self::ENCODED_LEN,
11066                __tmp.remaining(),
11067            )
11068        }
11069        __tmp.put_u64_le(self.time_usec);
11070        __tmp.put_f32_le(self.vel_ratio);
11071        __tmp.put_f32_le(self.pos_horiz_ratio);
11072        __tmp.put_f32_le(self.pos_vert_ratio);
11073        __tmp.put_f32_le(self.mag_ratio);
11074        __tmp.put_f32_le(self.hagl_ratio);
11075        __tmp.put_f32_le(self.tas_ratio);
11076        __tmp.put_f32_le(self.pos_horiz_accuracy);
11077        __tmp.put_f32_le(self.pos_vert_accuracy);
11078        __tmp.put_u16_le(self.flags.bits());
11079        if matches!(version, MavlinkVersion::V2) {
11080            let len = __tmp.len();
11081            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11082        } else {
11083            __tmp.len()
11084        }
11085    }
11086}
11087#[doc = "id: 410"]
11088#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
11089#[derive(Debug, Clone, PartialEq)]
11090#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11091#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11092pub struct EVENT_DATA {
11093    #[doc = "Event ID (as defined in the component metadata)"]
11094    pub id: u32,
11095    #[doc = "Timestamp (time since system boot when the event happened)."]
11096    pub event_time_boot_ms: u32,
11097    #[doc = "Sequence number."]
11098    pub sequence: u16,
11099    #[doc = "Component ID"]
11100    pub destination_component: u8,
11101    #[doc = "System ID"]
11102    pub destination_system: u8,
11103    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
11104    pub log_levels: u8,
11105    #[doc = "Arguments (depend on event ID)."]
11106    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11107    pub arguments: [u8; 40],
11108}
11109impl EVENT_DATA {
11110    pub const ENCODED_LEN: usize = 53usize;
11111    pub const DEFAULT: Self = Self {
11112        id: 0_u32,
11113        event_time_boot_ms: 0_u32,
11114        sequence: 0_u16,
11115        destination_component: 0_u8,
11116        destination_system: 0_u8,
11117        log_levels: 0_u8,
11118        arguments: [0_u8; 40usize],
11119    };
11120    #[cfg(feature = "arbitrary")]
11121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11122        use arbitrary::{Arbitrary, Unstructured};
11123        let mut buf = [0u8; 1024];
11124        rng.fill_bytes(&mut buf);
11125        let mut unstructured = Unstructured::new(&buf);
11126        Self::arbitrary(&mut unstructured).unwrap_or_default()
11127    }
11128}
11129impl Default for EVENT_DATA {
11130    fn default() -> Self {
11131        Self::DEFAULT.clone()
11132    }
11133}
11134impl MessageData for EVENT_DATA {
11135    type Message = MavMessage;
11136    const ID: u32 = 410u32;
11137    const NAME: &'static str = "EVENT";
11138    const EXTRA_CRC: u8 = 160u8;
11139    const ENCODED_LEN: usize = 53usize;
11140    fn deser(
11141        _version: MavlinkVersion,
11142        __input: &[u8],
11143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11144        let avail_len = __input.len();
11145        let mut payload_buf = [0; Self::ENCODED_LEN];
11146        let mut buf = if avail_len < Self::ENCODED_LEN {
11147            payload_buf[0..avail_len].copy_from_slice(__input);
11148            Bytes::new(&payload_buf)
11149        } else {
11150            Bytes::new(__input)
11151        };
11152        let mut __struct = Self::default();
11153        __struct.id = buf.get_u32_le();
11154        __struct.event_time_boot_ms = buf.get_u32_le();
11155        __struct.sequence = buf.get_u16_le();
11156        __struct.destination_component = buf.get_u8();
11157        __struct.destination_system = buf.get_u8();
11158        __struct.log_levels = buf.get_u8();
11159        for v in &mut __struct.arguments {
11160            let val = buf.get_u8();
11161            *v = val;
11162        }
11163        Ok(__struct)
11164    }
11165    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11166        let mut __tmp = BytesMut::new(bytes);
11167        #[allow(clippy::absurd_extreme_comparisons)]
11168        #[allow(unused_comparisons)]
11169        if __tmp.remaining() < Self::ENCODED_LEN {
11170            panic!(
11171                "buffer is too small (need {} bytes, but got {})",
11172                Self::ENCODED_LEN,
11173                __tmp.remaining(),
11174            )
11175        }
11176        __tmp.put_u32_le(self.id);
11177        __tmp.put_u32_le(self.event_time_boot_ms);
11178        __tmp.put_u16_le(self.sequence);
11179        __tmp.put_u8(self.destination_component);
11180        __tmp.put_u8(self.destination_system);
11181        __tmp.put_u8(self.log_levels);
11182        for val in &self.arguments {
11183            __tmp.put_u8(*val);
11184        }
11185        if matches!(version, MavlinkVersion::V2) {
11186            let len = __tmp.len();
11187            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11188        } else {
11189            __tmp.len()
11190        }
11191    }
11192}
11193#[doc = "id: 245"]
11194#[doc = "Provides state for additional features."]
11195#[derive(Debug, Clone, PartialEq)]
11196#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11197#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11198pub struct EXTENDED_SYS_STATE_DATA {
11199    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11200    pub vtol_state: MavVtolState,
11201    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11202    pub landed_state: MavLandedState,
11203}
11204impl EXTENDED_SYS_STATE_DATA {
11205    pub const ENCODED_LEN: usize = 2usize;
11206    pub const DEFAULT: Self = Self {
11207        vtol_state: MavVtolState::DEFAULT,
11208        landed_state: MavLandedState::DEFAULT,
11209    };
11210    #[cfg(feature = "arbitrary")]
11211    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11212        use arbitrary::{Arbitrary, Unstructured};
11213        let mut buf = [0u8; 1024];
11214        rng.fill_bytes(&mut buf);
11215        let mut unstructured = Unstructured::new(&buf);
11216        Self::arbitrary(&mut unstructured).unwrap_or_default()
11217    }
11218}
11219impl Default for EXTENDED_SYS_STATE_DATA {
11220    fn default() -> Self {
11221        Self::DEFAULT.clone()
11222    }
11223}
11224impl MessageData for EXTENDED_SYS_STATE_DATA {
11225    type Message = MavMessage;
11226    const ID: u32 = 245u32;
11227    const NAME: &'static str = "EXTENDED_SYS_STATE";
11228    const EXTRA_CRC: u8 = 130u8;
11229    const ENCODED_LEN: usize = 2usize;
11230    fn deser(
11231        _version: MavlinkVersion,
11232        __input: &[u8],
11233    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11234        let avail_len = __input.len();
11235        let mut payload_buf = [0; Self::ENCODED_LEN];
11236        let mut buf = if avail_len < Self::ENCODED_LEN {
11237            payload_buf[0..avail_len].copy_from_slice(__input);
11238            Bytes::new(&payload_buf)
11239        } else {
11240            Bytes::new(__input)
11241        };
11242        let mut __struct = Self::default();
11243        let tmp = buf.get_u8();
11244        __struct.vtol_state =
11245            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11246                enum_type: "MavVtolState",
11247                value: tmp as u32,
11248            })?;
11249        let tmp = buf.get_u8();
11250        __struct.landed_state =
11251            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11252                enum_type: "MavLandedState",
11253                value: tmp as u32,
11254            })?;
11255        Ok(__struct)
11256    }
11257    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11258        let mut __tmp = BytesMut::new(bytes);
11259        #[allow(clippy::absurd_extreme_comparisons)]
11260        #[allow(unused_comparisons)]
11261        if __tmp.remaining() < Self::ENCODED_LEN {
11262            panic!(
11263                "buffer is too small (need {} bytes, but got {})",
11264                Self::ENCODED_LEN,
11265                __tmp.remaining(),
11266            )
11267        }
11268        __tmp.put_u8(self.vtol_state as u8);
11269        __tmp.put_u8(self.landed_state as u8);
11270        if matches!(version, MavlinkVersion::V2) {
11271            let len = __tmp.len();
11272            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11273        } else {
11274            __tmp.len()
11275        }
11276    }
11277}
11278#[doc = "id: 162"]
11279#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11280#[derive(Debug, Clone, PartialEq)]
11281#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11282#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11283pub struct FENCE_STATUS_DATA {
11284    #[doc = "Time (since boot) of last breach."]
11285    pub breach_time: u32,
11286    #[doc = "Number of fence breaches."]
11287    pub breach_count: u16,
11288    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11289    pub breach_status: u8,
11290    #[doc = "Last breach type."]
11291    pub breach_type: FenceBreach,
11292    #[doc = "Active action to prevent fence breach"]
11293    #[cfg_attr(feature = "serde", serde(default))]
11294    pub breach_mitigation: FenceMitigate,
11295}
11296impl FENCE_STATUS_DATA {
11297    pub const ENCODED_LEN: usize = 9usize;
11298    pub const DEFAULT: Self = Self {
11299        breach_time: 0_u32,
11300        breach_count: 0_u16,
11301        breach_status: 0_u8,
11302        breach_type: FenceBreach::DEFAULT,
11303        breach_mitigation: FenceMitigate::DEFAULT,
11304    };
11305    #[cfg(feature = "arbitrary")]
11306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11307        use arbitrary::{Arbitrary, Unstructured};
11308        let mut buf = [0u8; 1024];
11309        rng.fill_bytes(&mut buf);
11310        let mut unstructured = Unstructured::new(&buf);
11311        Self::arbitrary(&mut unstructured).unwrap_or_default()
11312    }
11313}
11314impl Default for FENCE_STATUS_DATA {
11315    fn default() -> Self {
11316        Self::DEFAULT.clone()
11317    }
11318}
11319impl MessageData for FENCE_STATUS_DATA {
11320    type Message = MavMessage;
11321    const ID: u32 = 162u32;
11322    const NAME: &'static str = "FENCE_STATUS";
11323    const EXTRA_CRC: u8 = 189u8;
11324    const ENCODED_LEN: usize = 9usize;
11325    fn deser(
11326        _version: MavlinkVersion,
11327        __input: &[u8],
11328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11329        let avail_len = __input.len();
11330        let mut payload_buf = [0; Self::ENCODED_LEN];
11331        let mut buf = if avail_len < Self::ENCODED_LEN {
11332            payload_buf[0..avail_len].copy_from_slice(__input);
11333            Bytes::new(&payload_buf)
11334        } else {
11335            Bytes::new(__input)
11336        };
11337        let mut __struct = Self::default();
11338        __struct.breach_time = buf.get_u32_le();
11339        __struct.breach_count = buf.get_u16_le();
11340        __struct.breach_status = buf.get_u8();
11341        let tmp = buf.get_u8();
11342        __struct.breach_type =
11343            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11344                enum_type: "FenceBreach",
11345                value: tmp as u32,
11346            })?;
11347        let tmp = buf.get_u8();
11348        __struct.breach_mitigation =
11349            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11350                enum_type: "FenceMitigate",
11351                value: tmp as u32,
11352            })?;
11353        Ok(__struct)
11354    }
11355    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11356        let mut __tmp = BytesMut::new(bytes);
11357        #[allow(clippy::absurd_extreme_comparisons)]
11358        #[allow(unused_comparisons)]
11359        if __tmp.remaining() < Self::ENCODED_LEN {
11360            panic!(
11361                "buffer is too small (need {} bytes, but got {})",
11362                Self::ENCODED_LEN,
11363                __tmp.remaining(),
11364            )
11365        }
11366        __tmp.put_u32_le(self.breach_time);
11367        __tmp.put_u16_le(self.breach_count);
11368        __tmp.put_u8(self.breach_status);
11369        __tmp.put_u8(self.breach_type as u8);
11370        __tmp.put_u8(self.breach_mitigation as u8);
11371        if matches!(version, MavlinkVersion::V2) {
11372            let len = __tmp.len();
11373            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11374        } else {
11375            __tmp.len()
11376        }
11377    }
11378}
11379#[doc = "id: 110"]
11380#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11381#[derive(Debug, Clone, PartialEq)]
11382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11383#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11384pub struct FILE_TRANSFER_PROTOCOL_DATA {
11385    #[doc = "Network ID (0 for broadcast)"]
11386    pub target_network: u8,
11387    #[doc = "System ID (0 for broadcast)"]
11388    pub target_system: u8,
11389    #[doc = "Component ID (0 for broadcast)"]
11390    pub target_component: u8,
11391    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11392    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11393    pub payload: [u8; 251],
11394}
11395impl FILE_TRANSFER_PROTOCOL_DATA {
11396    pub const ENCODED_LEN: usize = 254usize;
11397    pub const DEFAULT: Self = Self {
11398        target_network: 0_u8,
11399        target_system: 0_u8,
11400        target_component: 0_u8,
11401        payload: [0_u8; 251usize],
11402    };
11403    #[cfg(feature = "arbitrary")]
11404    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11405        use arbitrary::{Arbitrary, Unstructured};
11406        let mut buf = [0u8; 1024];
11407        rng.fill_bytes(&mut buf);
11408        let mut unstructured = Unstructured::new(&buf);
11409        Self::arbitrary(&mut unstructured).unwrap_or_default()
11410    }
11411}
11412impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11413    fn default() -> Self {
11414        Self::DEFAULT.clone()
11415    }
11416}
11417impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11418    type Message = MavMessage;
11419    const ID: u32 = 110u32;
11420    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11421    const EXTRA_CRC: u8 = 84u8;
11422    const ENCODED_LEN: usize = 254usize;
11423    fn deser(
11424        _version: MavlinkVersion,
11425        __input: &[u8],
11426    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11427        let avail_len = __input.len();
11428        let mut payload_buf = [0; Self::ENCODED_LEN];
11429        let mut buf = if avail_len < Self::ENCODED_LEN {
11430            payload_buf[0..avail_len].copy_from_slice(__input);
11431            Bytes::new(&payload_buf)
11432        } else {
11433            Bytes::new(__input)
11434        };
11435        let mut __struct = Self::default();
11436        __struct.target_network = buf.get_u8();
11437        __struct.target_system = buf.get_u8();
11438        __struct.target_component = buf.get_u8();
11439        for v in &mut __struct.payload {
11440            let val = buf.get_u8();
11441            *v = val;
11442        }
11443        Ok(__struct)
11444    }
11445    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11446        let mut __tmp = BytesMut::new(bytes);
11447        #[allow(clippy::absurd_extreme_comparisons)]
11448        #[allow(unused_comparisons)]
11449        if __tmp.remaining() < Self::ENCODED_LEN {
11450            panic!(
11451                "buffer is too small (need {} bytes, but got {})",
11452                Self::ENCODED_LEN,
11453                __tmp.remaining(),
11454            )
11455        }
11456        __tmp.put_u8(self.target_network);
11457        __tmp.put_u8(self.target_system);
11458        __tmp.put_u8(self.target_component);
11459        for val in &self.payload {
11460            __tmp.put_u8(*val);
11461        }
11462        if matches!(version, MavlinkVersion::V2) {
11463            let len = __tmp.len();
11464            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11465        } else {
11466            __tmp.len()
11467        }
11468    }
11469}
11470#[doc = "id: 264"]
11471#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11472#[derive(Debug, Clone, PartialEq)]
11473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11474#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11475pub struct FLIGHT_INFORMATION_DATA {
11476    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11477    pub arming_time_utc: u64,
11478    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11479    pub takeoff_time_utc: u64,
11480    #[doc = "Flight number. Note, field is misnamed UUID."]
11481    pub flight_uuid: u64,
11482    #[doc = "Timestamp (time since system boot)."]
11483    pub time_boot_ms: u32,
11484    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11485    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11486    pub landing_time: u32,
11487}
11488impl FLIGHT_INFORMATION_DATA {
11489    pub const ENCODED_LEN: usize = 32usize;
11490    pub const DEFAULT: Self = Self {
11491        arming_time_utc: 0_u64,
11492        takeoff_time_utc: 0_u64,
11493        flight_uuid: 0_u64,
11494        time_boot_ms: 0_u32,
11495        landing_time: 0_u32,
11496    };
11497    #[cfg(feature = "arbitrary")]
11498    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11499        use arbitrary::{Arbitrary, Unstructured};
11500        let mut buf = [0u8; 1024];
11501        rng.fill_bytes(&mut buf);
11502        let mut unstructured = Unstructured::new(&buf);
11503        Self::arbitrary(&mut unstructured).unwrap_or_default()
11504    }
11505}
11506impl Default for FLIGHT_INFORMATION_DATA {
11507    fn default() -> Self {
11508        Self::DEFAULT.clone()
11509    }
11510}
11511impl MessageData for FLIGHT_INFORMATION_DATA {
11512    type Message = MavMessage;
11513    const ID: u32 = 264u32;
11514    const NAME: &'static str = "FLIGHT_INFORMATION";
11515    const EXTRA_CRC: u8 = 49u8;
11516    const ENCODED_LEN: usize = 32usize;
11517    fn deser(
11518        _version: MavlinkVersion,
11519        __input: &[u8],
11520    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11521        let avail_len = __input.len();
11522        let mut payload_buf = [0; Self::ENCODED_LEN];
11523        let mut buf = if avail_len < Self::ENCODED_LEN {
11524            payload_buf[0..avail_len].copy_from_slice(__input);
11525            Bytes::new(&payload_buf)
11526        } else {
11527            Bytes::new(__input)
11528        };
11529        let mut __struct = Self::default();
11530        __struct.arming_time_utc = buf.get_u64_le();
11531        __struct.takeoff_time_utc = buf.get_u64_le();
11532        __struct.flight_uuid = buf.get_u64_le();
11533        __struct.time_boot_ms = buf.get_u32_le();
11534        __struct.landing_time = buf.get_u32_le();
11535        Ok(__struct)
11536    }
11537    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11538        let mut __tmp = BytesMut::new(bytes);
11539        #[allow(clippy::absurd_extreme_comparisons)]
11540        #[allow(unused_comparisons)]
11541        if __tmp.remaining() < Self::ENCODED_LEN {
11542            panic!(
11543                "buffer is too small (need {} bytes, but got {})",
11544                Self::ENCODED_LEN,
11545                __tmp.remaining(),
11546            )
11547        }
11548        __tmp.put_u64_le(self.arming_time_utc);
11549        __tmp.put_u64_le(self.takeoff_time_utc);
11550        __tmp.put_u64_le(self.flight_uuid);
11551        __tmp.put_u32_le(self.time_boot_ms);
11552        __tmp.put_u32_le(self.landing_time);
11553        if matches!(version, MavlinkVersion::V2) {
11554            let len = __tmp.len();
11555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11556        } else {
11557            __tmp.len()
11558        }
11559    }
11560}
11561#[doc = "id: 144"]
11562#[doc = "Current motion information from a designated system."]
11563#[derive(Debug, Clone, PartialEq)]
11564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11566pub struct FOLLOW_TARGET_DATA {
11567    #[doc = "Timestamp (time since system boot)."]
11568    pub timestamp: u64,
11569    #[doc = "button states or switches of a tracker device"]
11570    pub custom_state: u64,
11571    #[doc = "Latitude (WGS84)"]
11572    pub lat: i32,
11573    #[doc = "Longitude (WGS84)"]
11574    pub lon: i32,
11575    #[doc = "Altitude (MSL)"]
11576    pub alt: f32,
11577    #[doc = "target velocity (0,0,0) for unknown"]
11578    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11579    pub vel: [f32; 3],
11580    #[doc = "linear target acceleration (0,0,0) for unknown"]
11581    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11582    pub acc: [f32; 3],
11583    #[doc = "(0 0 0 0 for unknown)"]
11584    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11585    pub attitude_q: [f32; 4],
11586    #[doc = "(0 0 0 for unknown)"]
11587    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11588    pub rates: [f32; 3],
11589    #[doc = "eph epv"]
11590    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11591    pub position_cov: [f32; 3],
11592    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11593    pub est_capabilities: u8,
11594}
11595impl FOLLOW_TARGET_DATA {
11596    pub const ENCODED_LEN: usize = 93usize;
11597    pub const DEFAULT: Self = Self {
11598        timestamp: 0_u64,
11599        custom_state: 0_u64,
11600        lat: 0_i32,
11601        lon: 0_i32,
11602        alt: 0.0_f32,
11603        vel: [0.0_f32; 3usize],
11604        acc: [0.0_f32; 3usize],
11605        attitude_q: [0.0_f32; 4usize],
11606        rates: [0.0_f32; 3usize],
11607        position_cov: [0.0_f32; 3usize],
11608        est_capabilities: 0_u8,
11609    };
11610    #[cfg(feature = "arbitrary")]
11611    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11612        use arbitrary::{Arbitrary, Unstructured};
11613        let mut buf = [0u8; 1024];
11614        rng.fill_bytes(&mut buf);
11615        let mut unstructured = Unstructured::new(&buf);
11616        Self::arbitrary(&mut unstructured).unwrap_or_default()
11617    }
11618}
11619impl Default for FOLLOW_TARGET_DATA {
11620    fn default() -> Self {
11621        Self::DEFAULT.clone()
11622    }
11623}
11624impl MessageData for FOLLOW_TARGET_DATA {
11625    type Message = MavMessage;
11626    const ID: u32 = 144u32;
11627    const NAME: &'static str = "FOLLOW_TARGET";
11628    const EXTRA_CRC: u8 = 127u8;
11629    const ENCODED_LEN: usize = 93usize;
11630    fn deser(
11631        _version: MavlinkVersion,
11632        __input: &[u8],
11633    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11634        let avail_len = __input.len();
11635        let mut payload_buf = [0; Self::ENCODED_LEN];
11636        let mut buf = if avail_len < Self::ENCODED_LEN {
11637            payload_buf[0..avail_len].copy_from_slice(__input);
11638            Bytes::new(&payload_buf)
11639        } else {
11640            Bytes::new(__input)
11641        };
11642        let mut __struct = Self::default();
11643        __struct.timestamp = buf.get_u64_le();
11644        __struct.custom_state = buf.get_u64_le();
11645        __struct.lat = buf.get_i32_le();
11646        __struct.lon = buf.get_i32_le();
11647        __struct.alt = buf.get_f32_le();
11648        for v in &mut __struct.vel {
11649            let val = buf.get_f32_le();
11650            *v = val;
11651        }
11652        for v in &mut __struct.acc {
11653            let val = buf.get_f32_le();
11654            *v = val;
11655        }
11656        for v in &mut __struct.attitude_q {
11657            let val = buf.get_f32_le();
11658            *v = val;
11659        }
11660        for v in &mut __struct.rates {
11661            let val = buf.get_f32_le();
11662            *v = val;
11663        }
11664        for v in &mut __struct.position_cov {
11665            let val = buf.get_f32_le();
11666            *v = val;
11667        }
11668        __struct.est_capabilities = buf.get_u8();
11669        Ok(__struct)
11670    }
11671    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11672        let mut __tmp = BytesMut::new(bytes);
11673        #[allow(clippy::absurd_extreme_comparisons)]
11674        #[allow(unused_comparisons)]
11675        if __tmp.remaining() < Self::ENCODED_LEN {
11676            panic!(
11677                "buffer is too small (need {} bytes, but got {})",
11678                Self::ENCODED_LEN,
11679                __tmp.remaining(),
11680            )
11681        }
11682        __tmp.put_u64_le(self.timestamp);
11683        __tmp.put_u64_le(self.custom_state);
11684        __tmp.put_i32_le(self.lat);
11685        __tmp.put_i32_le(self.lon);
11686        __tmp.put_f32_le(self.alt);
11687        for val in &self.vel {
11688            __tmp.put_f32_le(*val);
11689        }
11690        for val in &self.acc {
11691            __tmp.put_f32_le(*val);
11692        }
11693        for val in &self.attitude_q {
11694            __tmp.put_f32_le(*val);
11695        }
11696        for val in &self.rates {
11697            __tmp.put_f32_le(*val);
11698        }
11699        for val in &self.position_cov {
11700            __tmp.put_f32_le(*val);
11701        }
11702        __tmp.put_u8(self.est_capabilities);
11703        if matches!(version, MavlinkVersion::V2) {
11704            let len = __tmp.len();
11705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11706        } else {
11707            __tmp.len()
11708        }
11709    }
11710}
11711#[doc = "id: 371"]
11712#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11713#[derive(Debug, Clone, PartialEq)]
11714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11716pub struct FUEL_STATUS_DATA {
11717    #[doc = "Capacity when full. Must be provided."]
11718    pub maximum_fuel: f32,
11719    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11720    pub consumed_fuel: f32,
11721    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11722    pub remaining_fuel: f32,
11723    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11724    pub flow_rate: f32,
11725    #[doc = "Fuel temperature. NaN: field not provided."]
11726    pub temperature: f32,
11727    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
11728    pub fuel_type: MavFuelType,
11729    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
11730    pub id: u8,
11731    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
11732    pub percent_remaining: u8,
11733}
11734impl FUEL_STATUS_DATA {
11735    pub const ENCODED_LEN: usize = 26usize;
11736    pub const DEFAULT: Self = Self {
11737        maximum_fuel: 0.0_f32,
11738        consumed_fuel: 0.0_f32,
11739        remaining_fuel: 0.0_f32,
11740        flow_rate: 0.0_f32,
11741        temperature: 0.0_f32,
11742        fuel_type: MavFuelType::DEFAULT,
11743        id: 0_u8,
11744        percent_remaining: 0_u8,
11745    };
11746    #[cfg(feature = "arbitrary")]
11747    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11748        use arbitrary::{Arbitrary, Unstructured};
11749        let mut buf = [0u8; 1024];
11750        rng.fill_bytes(&mut buf);
11751        let mut unstructured = Unstructured::new(&buf);
11752        Self::arbitrary(&mut unstructured).unwrap_or_default()
11753    }
11754}
11755impl Default for FUEL_STATUS_DATA {
11756    fn default() -> Self {
11757        Self::DEFAULT.clone()
11758    }
11759}
11760impl MessageData for FUEL_STATUS_DATA {
11761    type Message = MavMessage;
11762    const ID: u32 = 371u32;
11763    const NAME: &'static str = "FUEL_STATUS";
11764    const EXTRA_CRC: u8 = 10u8;
11765    const ENCODED_LEN: usize = 26usize;
11766    fn deser(
11767        _version: MavlinkVersion,
11768        __input: &[u8],
11769    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11770        let avail_len = __input.len();
11771        let mut payload_buf = [0; Self::ENCODED_LEN];
11772        let mut buf = if avail_len < Self::ENCODED_LEN {
11773            payload_buf[0..avail_len].copy_from_slice(__input);
11774            Bytes::new(&payload_buf)
11775        } else {
11776            Bytes::new(__input)
11777        };
11778        let mut __struct = Self::default();
11779        __struct.maximum_fuel = buf.get_f32_le();
11780        __struct.consumed_fuel = buf.get_f32_le();
11781        __struct.remaining_fuel = buf.get_f32_le();
11782        __struct.flow_rate = buf.get_f32_le();
11783        __struct.temperature = buf.get_f32_le();
11784        let tmp = buf.get_u32_le();
11785        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
11786            ::mavlink_core::error::ParserError::InvalidEnum {
11787                enum_type: "MavFuelType",
11788                value: tmp as u32,
11789            },
11790        )?;
11791        __struct.id = buf.get_u8();
11792        __struct.percent_remaining = buf.get_u8();
11793        Ok(__struct)
11794    }
11795    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11796        let mut __tmp = BytesMut::new(bytes);
11797        #[allow(clippy::absurd_extreme_comparisons)]
11798        #[allow(unused_comparisons)]
11799        if __tmp.remaining() < Self::ENCODED_LEN {
11800            panic!(
11801                "buffer is too small (need {} bytes, but got {})",
11802                Self::ENCODED_LEN,
11803                __tmp.remaining(),
11804            )
11805        }
11806        __tmp.put_f32_le(self.maximum_fuel);
11807        __tmp.put_f32_le(self.consumed_fuel);
11808        __tmp.put_f32_le(self.remaining_fuel);
11809        __tmp.put_f32_le(self.flow_rate);
11810        __tmp.put_f32_le(self.temperature);
11811        __tmp.put_u32_le(self.fuel_type as u32);
11812        __tmp.put_u8(self.id);
11813        __tmp.put_u8(self.percent_remaining);
11814        if matches!(version, MavlinkVersion::V2) {
11815            let len = __tmp.len();
11816            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11817        } else {
11818            __tmp.len()
11819        }
11820    }
11821}
11822#[doc = "id: 373"]
11823#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
11824#[derive(Debug, Clone, PartialEq)]
11825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11826#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11827pub struct GENERATOR_STATUS_DATA {
11828    #[doc = "Status flags."]
11829    pub status: MavGeneratorStatusFlag,
11830    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
11831    pub battery_current: f32,
11832    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
11833    pub load_current: f32,
11834    #[doc = "The power being generated. NaN: field not provided"]
11835    pub power_generated: f32,
11836    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
11837    pub bus_voltage: f32,
11838    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
11839    pub bat_current_setpoint: f32,
11840    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
11841    pub runtime: u32,
11842    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
11843    pub time_until_maintenance: i32,
11844    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
11845    pub generator_speed: u16,
11846    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
11847    pub rectifier_temperature: i16,
11848    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
11849    pub generator_temperature: i16,
11850}
11851impl GENERATOR_STATUS_DATA {
11852    pub const ENCODED_LEN: usize = 42usize;
11853    pub const DEFAULT: Self = Self {
11854        status: MavGeneratorStatusFlag::DEFAULT,
11855        battery_current: 0.0_f32,
11856        load_current: 0.0_f32,
11857        power_generated: 0.0_f32,
11858        bus_voltage: 0.0_f32,
11859        bat_current_setpoint: 0.0_f32,
11860        runtime: 0_u32,
11861        time_until_maintenance: 0_i32,
11862        generator_speed: 0_u16,
11863        rectifier_temperature: 0_i16,
11864        generator_temperature: 0_i16,
11865    };
11866    #[cfg(feature = "arbitrary")]
11867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11868        use arbitrary::{Arbitrary, Unstructured};
11869        let mut buf = [0u8; 1024];
11870        rng.fill_bytes(&mut buf);
11871        let mut unstructured = Unstructured::new(&buf);
11872        Self::arbitrary(&mut unstructured).unwrap_or_default()
11873    }
11874}
11875impl Default for GENERATOR_STATUS_DATA {
11876    fn default() -> Self {
11877        Self::DEFAULT.clone()
11878    }
11879}
11880impl MessageData for GENERATOR_STATUS_DATA {
11881    type Message = MavMessage;
11882    const ID: u32 = 373u32;
11883    const NAME: &'static str = "GENERATOR_STATUS";
11884    const EXTRA_CRC: u8 = 117u8;
11885    const ENCODED_LEN: usize = 42usize;
11886    fn deser(
11887        _version: MavlinkVersion,
11888        __input: &[u8],
11889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11890        let avail_len = __input.len();
11891        let mut payload_buf = [0; Self::ENCODED_LEN];
11892        let mut buf = if avail_len < Self::ENCODED_LEN {
11893            payload_buf[0..avail_len].copy_from_slice(__input);
11894            Bytes::new(&payload_buf)
11895        } else {
11896            Bytes::new(__input)
11897        };
11898        let mut __struct = Self::default();
11899        let tmp = buf.get_u64_le();
11900        __struct.status = MavGeneratorStatusFlag::from_bits(
11901            tmp & MavGeneratorStatusFlag::all().bits(),
11902        )
11903        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11904            flag_type: "MavGeneratorStatusFlag",
11905            value: tmp as u32,
11906        })?;
11907        __struct.battery_current = buf.get_f32_le();
11908        __struct.load_current = buf.get_f32_le();
11909        __struct.power_generated = buf.get_f32_le();
11910        __struct.bus_voltage = buf.get_f32_le();
11911        __struct.bat_current_setpoint = buf.get_f32_le();
11912        __struct.runtime = buf.get_u32_le();
11913        __struct.time_until_maintenance = buf.get_i32_le();
11914        __struct.generator_speed = buf.get_u16_le();
11915        __struct.rectifier_temperature = buf.get_i16_le();
11916        __struct.generator_temperature = buf.get_i16_le();
11917        Ok(__struct)
11918    }
11919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11920        let mut __tmp = BytesMut::new(bytes);
11921        #[allow(clippy::absurd_extreme_comparisons)]
11922        #[allow(unused_comparisons)]
11923        if __tmp.remaining() < Self::ENCODED_LEN {
11924            panic!(
11925                "buffer is too small (need {} bytes, but got {})",
11926                Self::ENCODED_LEN,
11927                __tmp.remaining(),
11928            )
11929        }
11930        __tmp.put_u64_le(self.status.bits());
11931        __tmp.put_f32_le(self.battery_current);
11932        __tmp.put_f32_le(self.load_current);
11933        __tmp.put_f32_le(self.power_generated);
11934        __tmp.put_f32_le(self.bus_voltage);
11935        __tmp.put_f32_le(self.bat_current_setpoint);
11936        __tmp.put_u32_le(self.runtime);
11937        __tmp.put_i32_le(self.time_until_maintenance);
11938        __tmp.put_u16_le(self.generator_speed);
11939        __tmp.put_i16_le(self.rectifier_temperature);
11940        __tmp.put_i16_le(self.generator_temperature);
11941        if matches!(version, MavlinkVersion::V2) {
11942            let len = __tmp.len();
11943            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11944        } else {
11945            __tmp.len()
11946        }
11947    }
11948}
11949#[doc = "id: 285"]
11950#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
11951#[derive(Debug, Clone, PartialEq)]
11952#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11953#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11954pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11955    #[doc = "Timestamp (time since system boot)."]
11956    pub time_boot_ms: u32,
11957    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
11958    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11959    pub q: [f32; 4],
11960    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
11961    pub angular_velocity_x: f32,
11962    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
11963    pub angular_velocity_y: f32,
11964    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
11965    pub angular_velocity_z: f32,
11966    #[doc = "Failure flags (0 for no failure)"]
11967    pub failure_flags: GimbalDeviceErrorFlags,
11968    #[doc = "Current gimbal flags set."]
11969    pub flags: GimbalDeviceFlags,
11970    #[doc = "System ID"]
11971    pub target_system: u8,
11972    #[doc = "Component ID"]
11973    pub target_component: u8,
11974    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
11975    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11976    pub delta_yaw: f32,
11977    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
11978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11979    pub delta_yaw_velocity: f32,
11980    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
11981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11982    pub gimbal_device_id: u8,
11983}
11984impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11985    pub const ENCODED_LEN: usize = 49usize;
11986    pub const DEFAULT: Self = Self {
11987        time_boot_ms: 0_u32,
11988        q: [0.0_f32; 4usize],
11989        angular_velocity_x: 0.0_f32,
11990        angular_velocity_y: 0.0_f32,
11991        angular_velocity_z: 0.0_f32,
11992        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
11993        flags: GimbalDeviceFlags::DEFAULT,
11994        target_system: 0_u8,
11995        target_component: 0_u8,
11996        delta_yaw: 0.0_f32,
11997        delta_yaw_velocity: 0.0_f32,
11998        gimbal_device_id: 0_u8,
11999    };
12000    #[cfg(feature = "arbitrary")]
12001    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12002        use arbitrary::{Arbitrary, Unstructured};
12003        let mut buf = [0u8; 1024];
12004        rng.fill_bytes(&mut buf);
12005        let mut unstructured = Unstructured::new(&buf);
12006        Self::arbitrary(&mut unstructured).unwrap_or_default()
12007    }
12008}
12009impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12010    fn default() -> Self {
12011        Self::DEFAULT.clone()
12012    }
12013}
12014impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
12015    type Message = MavMessage;
12016    const ID: u32 = 285u32;
12017    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
12018    const EXTRA_CRC: u8 = 137u8;
12019    const ENCODED_LEN: usize = 49usize;
12020    fn deser(
12021        _version: MavlinkVersion,
12022        __input: &[u8],
12023    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12024        let avail_len = __input.len();
12025        let mut payload_buf = [0; Self::ENCODED_LEN];
12026        let mut buf = if avail_len < Self::ENCODED_LEN {
12027            payload_buf[0..avail_len].copy_from_slice(__input);
12028            Bytes::new(&payload_buf)
12029        } else {
12030            Bytes::new(__input)
12031        };
12032        let mut __struct = Self::default();
12033        __struct.time_boot_ms = buf.get_u32_le();
12034        for v in &mut __struct.q {
12035            let val = buf.get_f32_le();
12036            *v = val;
12037        }
12038        __struct.angular_velocity_x = buf.get_f32_le();
12039        __struct.angular_velocity_y = buf.get_f32_le();
12040        __struct.angular_velocity_z = buf.get_f32_le();
12041        let tmp = buf.get_u32_le();
12042        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
12043            tmp & GimbalDeviceErrorFlags::all().bits(),
12044        )
12045        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12046            flag_type: "GimbalDeviceErrorFlags",
12047            value: tmp as u32,
12048        })?;
12049        let tmp = buf.get_u16_le();
12050        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12051            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12052                flag_type: "GimbalDeviceFlags",
12053                value: tmp as u32,
12054            })?;
12055        __struct.target_system = buf.get_u8();
12056        __struct.target_component = buf.get_u8();
12057        __struct.delta_yaw = buf.get_f32_le();
12058        __struct.delta_yaw_velocity = buf.get_f32_le();
12059        __struct.gimbal_device_id = buf.get_u8();
12060        Ok(__struct)
12061    }
12062    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12063        let mut __tmp = BytesMut::new(bytes);
12064        #[allow(clippy::absurd_extreme_comparisons)]
12065        #[allow(unused_comparisons)]
12066        if __tmp.remaining() < Self::ENCODED_LEN {
12067            panic!(
12068                "buffer is too small (need {} bytes, but got {})",
12069                Self::ENCODED_LEN,
12070                __tmp.remaining(),
12071            )
12072        }
12073        __tmp.put_u32_le(self.time_boot_ms);
12074        for val in &self.q {
12075            __tmp.put_f32_le(*val);
12076        }
12077        __tmp.put_f32_le(self.angular_velocity_x);
12078        __tmp.put_f32_le(self.angular_velocity_y);
12079        __tmp.put_f32_le(self.angular_velocity_z);
12080        __tmp.put_u32_le(self.failure_flags.bits());
12081        __tmp.put_u16_le(self.flags.bits());
12082        __tmp.put_u8(self.target_system);
12083        __tmp.put_u8(self.target_component);
12084        __tmp.put_f32_le(self.delta_yaw);
12085        __tmp.put_f32_le(self.delta_yaw_velocity);
12086        __tmp.put_u8(self.gimbal_device_id);
12087        if matches!(version, MavlinkVersion::V2) {
12088            let len = __tmp.len();
12089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12090        } else {
12091            __tmp.len()
12092        }
12093    }
12094}
12095#[doc = "id: 283"]
12096#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
12097#[derive(Debug, Clone, PartialEq)]
12098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12100pub struct GIMBAL_DEVICE_INFORMATION_DATA {
12101    #[doc = "UID of gimbal hardware (0 if unknown)."]
12102    pub uid: u64,
12103    #[doc = "Timestamp (time since system boot)."]
12104    pub time_boot_ms: u32,
12105    #[doc = "0xff)."]
12106    pub firmware_version: u32,
12107    #[doc = "0xff)."]
12108    pub hardware_version: u32,
12109    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12110    pub roll_min: f32,
12111    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
12112    pub roll_max: f32,
12113    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12114    pub pitch_min: f32,
12115    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
12116    pub pitch_max: f32,
12117    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12118    pub yaw_min: f32,
12119    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
12120    pub yaw_max: f32,
12121    #[doc = "Bitmap of gimbal capability flags."]
12122    pub cap_flags: GimbalDeviceCapFlags,
12123    #[doc = "Bitmap for use for gimbal-specific capability flags."]
12124    pub custom_cap_flags: u16,
12125    #[doc = "Name of the gimbal vendor."]
12126    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12127    pub vendor_name: [u8; 32],
12128    #[doc = "Name of the gimbal model."]
12129    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12130    pub model_name: [u8; 32],
12131    #[doc = "Custom name of the gimbal given to it by the user."]
12132    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12133    pub custom_name: [u8; 32],
12134    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
12135    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
12136    pub gimbal_device_id: u8,
12137}
12138impl GIMBAL_DEVICE_INFORMATION_DATA {
12139    pub const ENCODED_LEN: usize = 145usize;
12140    pub const DEFAULT: Self = Self {
12141        uid: 0_u64,
12142        time_boot_ms: 0_u32,
12143        firmware_version: 0_u32,
12144        hardware_version: 0_u32,
12145        roll_min: 0.0_f32,
12146        roll_max: 0.0_f32,
12147        pitch_min: 0.0_f32,
12148        pitch_max: 0.0_f32,
12149        yaw_min: 0.0_f32,
12150        yaw_max: 0.0_f32,
12151        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12152        custom_cap_flags: 0_u16,
12153        vendor_name: [0_u8; 32usize],
12154        model_name: [0_u8; 32usize],
12155        custom_name: [0_u8; 32usize],
12156        gimbal_device_id: 0_u8,
12157    };
12158    #[cfg(feature = "arbitrary")]
12159    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12160        use arbitrary::{Arbitrary, Unstructured};
12161        let mut buf = [0u8; 1024];
12162        rng.fill_bytes(&mut buf);
12163        let mut unstructured = Unstructured::new(&buf);
12164        Self::arbitrary(&mut unstructured).unwrap_or_default()
12165    }
12166}
12167impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12168    fn default() -> Self {
12169        Self::DEFAULT.clone()
12170    }
12171}
12172impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12173    type Message = MavMessage;
12174    const ID: u32 = 283u32;
12175    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12176    const EXTRA_CRC: u8 = 74u8;
12177    const ENCODED_LEN: usize = 145usize;
12178    fn deser(
12179        _version: MavlinkVersion,
12180        __input: &[u8],
12181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12182        let avail_len = __input.len();
12183        let mut payload_buf = [0; Self::ENCODED_LEN];
12184        let mut buf = if avail_len < Self::ENCODED_LEN {
12185            payload_buf[0..avail_len].copy_from_slice(__input);
12186            Bytes::new(&payload_buf)
12187        } else {
12188            Bytes::new(__input)
12189        };
12190        let mut __struct = Self::default();
12191        __struct.uid = buf.get_u64_le();
12192        __struct.time_boot_ms = buf.get_u32_le();
12193        __struct.firmware_version = buf.get_u32_le();
12194        __struct.hardware_version = buf.get_u32_le();
12195        __struct.roll_min = buf.get_f32_le();
12196        __struct.roll_max = buf.get_f32_le();
12197        __struct.pitch_min = buf.get_f32_le();
12198        __struct.pitch_max = buf.get_f32_le();
12199        __struct.yaw_min = buf.get_f32_le();
12200        __struct.yaw_max = buf.get_f32_le();
12201        let tmp = buf.get_u16_le();
12202        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12203            tmp & GimbalDeviceCapFlags::all().bits(),
12204        )
12205        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12206            flag_type: "GimbalDeviceCapFlags",
12207            value: tmp as u32,
12208        })?;
12209        __struct.custom_cap_flags = buf.get_u16_le();
12210        for v in &mut __struct.vendor_name {
12211            let val = buf.get_u8();
12212            *v = val;
12213        }
12214        for v in &mut __struct.model_name {
12215            let val = buf.get_u8();
12216            *v = val;
12217        }
12218        for v in &mut __struct.custom_name {
12219            let val = buf.get_u8();
12220            *v = val;
12221        }
12222        __struct.gimbal_device_id = buf.get_u8();
12223        Ok(__struct)
12224    }
12225    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12226        let mut __tmp = BytesMut::new(bytes);
12227        #[allow(clippy::absurd_extreme_comparisons)]
12228        #[allow(unused_comparisons)]
12229        if __tmp.remaining() < Self::ENCODED_LEN {
12230            panic!(
12231                "buffer is too small (need {} bytes, but got {})",
12232                Self::ENCODED_LEN,
12233                __tmp.remaining(),
12234            )
12235        }
12236        __tmp.put_u64_le(self.uid);
12237        __tmp.put_u32_le(self.time_boot_ms);
12238        __tmp.put_u32_le(self.firmware_version);
12239        __tmp.put_u32_le(self.hardware_version);
12240        __tmp.put_f32_le(self.roll_min);
12241        __tmp.put_f32_le(self.roll_max);
12242        __tmp.put_f32_le(self.pitch_min);
12243        __tmp.put_f32_le(self.pitch_max);
12244        __tmp.put_f32_le(self.yaw_min);
12245        __tmp.put_f32_le(self.yaw_max);
12246        __tmp.put_u16_le(self.cap_flags.bits());
12247        __tmp.put_u16_le(self.custom_cap_flags);
12248        for val in &self.vendor_name {
12249            __tmp.put_u8(*val);
12250        }
12251        for val in &self.model_name {
12252            __tmp.put_u8(*val);
12253        }
12254        for val in &self.custom_name {
12255            __tmp.put_u8(*val);
12256        }
12257        __tmp.put_u8(self.gimbal_device_id);
12258        if matches!(version, MavlinkVersion::V2) {
12259            let len = __tmp.len();
12260            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12261        } else {
12262            __tmp.len()
12263        }
12264    }
12265}
12266#[doc = "id: 284"]
12267#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12268#[derive(Debug, Clone, PartialEq)]
12269#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12270#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12271pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12272    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12274    pub q: [f32; 4],
12275    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12276    pub angular_velocity_x: f32,
12277    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12278    pub angular_velocity_y: f32,
12279    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12280    pub angular_velocity_z: f32,
12281    #[doc = "Low level gimbal flags."]
12282    pub flags: GimbalDeviceFlags,
12283    #[doc = "System ID"]
12284    pub target_system: u8,
12285    #[doc = "Component ID"]
12286    pub target_component: u8,
12287}
12288impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12289    pub const ENCODED_LEN: usize = 32usize;
12290    pub const DEFAULT: Self = Self {
12291        q: [0.0_f32; 4usize],
12292        angular_velocity_x: 0.0_f32,
12293        angular_velocity_y: 0.0_f32,
12294        angular_velocity_z: 0.0_f32,
12295        flags: GimbalDeviceFlags::DEFAULT,
12296        target_system: 0_u8,
12297        target_component: 0_u8,
12298    };
12299    #[cfg(feature = "arbitrary")]
12300    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12301        use arbitrary::{Arbitrary, Unstructured};
12302        let mut buf = [0u8; 1024];
12303        rng.fill_bytes(&mut buf);
12304        let mut unstructured = Unstructured::new(&buf);
12305        Self::arbitrary(&mut unstructured).unwrap_or_default()
12306    }
12307}
12308impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12309    fn default() -> Self {
12310        Self::DEFAULT.clone()
12311    }
12312}
12313impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12314    type Message = MavMessage;
12315    const ID: u32 = 284u32;
12316    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12317    const EXTRA_CRC: u8 = 99u8;
12318    const ENCODED_LEN: usize = 32usize;
12319    fn deser(
12320        _version: MavlinkVersion,
12321        __input: &[u8],
12322    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12323        let avail_len = __input.len();
12324        let mut payload_buf = [0; Self::ENCODED_LEN];
12325        let mut buf = if avail_len < Self::ENCODED_LEN {
12326            payload_buf[0..avail_len].copy_from_slice(__input);
12327            Bytes::new(&payload_buf)
12328        } else {
12329            Bytes::new(__input)
12330        };
12331        let mut __struct = Self::default();
12332        for v in &mut __struct.q {
12333            let val = buf.get_f32_le();
12334            *v = val;
12335        }
12336        __struct.angular_velocity_x = buf.get_f32_le();
12337        __struct.angular_velocity_y = buf.get_f32_le();
12338        __struct.angular_velocity_z = buf.get_f32_le();
12339        let tmp = buf.get_u16_le();
12340        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12341            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12342                flag_type: "GimbalDeviceFlags",
12343                value: tmp as u32,
12344            })?;
12345        __struct.target_system = buf.get_u8();
12346        __struct.target_component = buf.get_u8();
12347        Ok(__struct)
12348    }
12349    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12350        let mut __tmp = BytesMut::new(bytes);
12351        #[allow(clippy::absurd_extreme_comparisons)]
12352        #[allow(unused_comparisons)]
12353        if __tmp.remaining() < Self::ENCODED_LEN {
12354            panic!(
12355                "buffer is too small (need {} bytes, but got {})",
12356                Self::ENCODED_LEN,
12357                __tmp.remaining(),
12358            )
12359        }
12360        for val in &self.q {
12361            __tmp.put_f32_le(*val);
12362        }
12363        __tmp.put_f32_le(self.angular_velocity_x);
12364        __tmp.put_f32_le(self.angular_velocity_y);
12365        __tmp.put_f32_le(self.angular_velocity_z);
12366        __tmp.put_u16_le(self.flags.bits());
12367        __tmp.put_u8(self.target_system);
12368        __tmp.put_u8(self.target_component);
12369        if matches!(version, MavlinkVersion::V2) {
12370            let len = __tmp.len();
12371            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12372        } else {
12373            __tmp.len()
12374        }
12375    }
12376}
12377#[doc = "id: 280"]
12378#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12379#[derive(Debug, Clone, PartialEq)]
12380#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12381#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12382pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12383    #[doc = "Timestamp (time since system boot)."]
12384    pub time_boot_ms: u32,
12385    #[doc = "Bitmap of gimbal capability flags."]
12386    pub cap_flags: GimbalManagerCapFlags,
12387    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12388    pub roll_min: f32,
12389    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12390    pub roll_max: f32,
12391    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12392    pub pitch_min: f32,
12393    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12394    pub pitch_max: f32,
12395    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12396    pub yaw_min: f32,
12397    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12398    pub yaw_max: f32,
12399    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12400    pub gimbal_device_id: u8,
12401}
12402impl GIMBAL_MANAGER_INFORMATION_DATA {
12403    pub const ENCODED_LEN: usize = 33usize;
12404    pub const DEFAULT: Self = Self {
12405        time_boot_ms: 0_u32,
12406        cap_flags: GimbalManagerCapFlags::DEFAULT,
12407        roll_min: 0.0_f32,
12408        roll_max: 0.0_f32,
12409        pitch_min: 0.0_f32,
12410        pitch_max: 0.0_f32,
12411        yaw_min: 0.0_f32,
12412        yaw_max: 0.0_f32,
12413        gimbal_device_id: 0_u8,
12414    };
12415    #[cfg(feature = "arbitrary")]
12416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12417        use arbitrary::{Arbitrary, Unstructured};
12418        let mut buf = [0u8; 1024];
12419        rng.fill_bytes(&mut buf);
12420        let mut unstructured = Unstructured::new(&buf);
12421        Self::arbitrary(&mut unstructured).unwrap_or_default()
12422    }
12423}
12424impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12425    fn default() -> Self {
12426        Self::DEFAULT.clone()
12427    }
12428}
12429impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12430    type Message = MavMessage;
12431    const ID: u32 = 280u32;
12432    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12433    const EXTRA_CRC: u8 = 70u8;
12434    const ENCODED_LEN: usize = 33usize;
12435    fn deser(
12436        _version: MavlinkVersion,
12437        __input: &[u8],
12438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12439        let avail_len = __input.len();
12440        let mut payload_buf = [0; Self::ENCODED_LEN];
12441        let mut buf = if avail_len < Self::ENCODED_LEN {
12442            payload_buf[0..avail_len].copy_from_slice(__input);
12443            Bytes::new(&payload_buf)
12444        } else {
12445            Bytes::new(__input)
12446        };
12447        let mut __struct = Self::default();
12448        __struct.time_boot_ms = buf.get_u32_le();
12449        let tmp = buf.get_u32_le();
12450        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12451            tmp & GimbalManagerCapFlags::all().bits(),
12452        )
12453        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12454            flag_type: "GimbalManagerCapFlags",
12455            value: tmp as u32,
12456        })?;
12457        __struct.roll_min = buf.get_f32_le();
12458        __struct.roll_max = buf.get_f32_le();
12459        __struct.pitch_min = buf.get_f32_le();
12460        __struct.pitch_max = buf.get_f32_le();
12461        __struct.yaw_min = buf.get_f32_le();
12462        __struct.yaw_max = buf.get_f32_le();
12463        __struct.gimbal_device_id = buf.get_u8();
12464        Ok(__struct)
12465    }
12466    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12467        let mut __tmp = BytesMut::new(bytes);
12468        #[allow(clippy::absurd_extreme_comparisons)]
12469        #[allow(unused_comparisons)]
12470        if __tmp.remaining() < Self::ENCODED_LEN {
12471            panic!(
12472                "buffer is too small (need {} bytes, but got {})",
12473                Self::ENCODED_LEN,
12474                __tmp.remaining(),
12475            )
12476        }
12477        __tmp.put_u32_le(self.time_boot_ms);
12478        __tmp.put_u32_le(self.cap_flags.bits());
12479        __tmp.put_f32_le(self.roll_min);
12480        __tmp.put_f32_le(self.roll_max);
12481        __tmp.put_f32_le(self.pitch_min);
12482        __tmp.put_f32_le(self.pitch_max);
12483        __tmp.put_f32_le(self.yaw_min);
12484        __tmp.put_f32_le(self.yaw_max);
12485        __tmp.put_u8(self.gimbal_device_id);
12486        if matches!(version, MavlinkVersion::V2) {
12487            let len = __tmp.len();
12488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12489        } else {
12490            __tmp.len()
12491        }
12492    }
12493}
12494#[doc = "id: 282"]
12495#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12496#[derive(Debug, Clone, PartialEq)]
12497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12499pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12500    #[doc = "High level gimbal manager flags to use."]
12501    pub flags: GimbalManagerFlags,
12502    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12503    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12504    pub q: [f32; 4],
12505    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12506    pub angular_velocity_x: f32,
12507    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12508    pub angular_velocity_y: f32,
12509    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12510    pub angular_velocity_z: f32,
12511    #[doc = "System ID"]
12512    pub target_system: u8,
12513    #[doc = "Component ID"]
12514    pub target_component: u8,
12515    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12516    pub gimbal_device_id: u8,
12517}
12518impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12519    pub const ENCODED_LEN: usize = 35usize;
12520    pub const DEFAULT: Self = Self {
12521        flags: GimbalManagerFlags::DEFAULT,
12522        q: [0.0_f32; 4usize],
12523        angular_velocity_x: 0.0_f32,
12524        angular_velocity_y: 0.0_f32,
12525        angular_velocity_z: 0.0_f32,
12526        target_system: 0_u8,
12527        target_component: 0_u8,
12528        gimbal_device_id: 0_u8,
12529    };
12530    #[cfg(feature = "arbitrary")]
12531    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12532        use arbitrary::{Arbitrary, Unstructured};
12533        let mut buf = [0u8; 1024];
12534        rng.fill_bytes(&mut buf);
12535        let mut unstructured = Unstructured::new(&buf);
12536        Self::arbitrary(&mut unstructured).unwrap_or_default()
12537    }
12538}
12539impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12540    fn default() -> Self {
12541        Self::DEFAULT.clone()
12542    }
12543}
12544impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12545    type Message = MavMessage;
12546    const ID: u32 = 282u32;
12547    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12548    const EXTRA_CRC: u8 = 123u8;
12549    const ENCODED_LEN: usize = 35usize;
12550    fn deser(
12551        _version: MavlinkVersion,
12552        __input: &[u8],
12553    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12554        let avail_len = __input.len();
12555        let mut payload_buf = [0; Self::ENCODED_LEN];
12556        let mut buf = if avail_len < Self::ENCODED_LEN {
12557            payload_buf[0..avail_len].copy_from_slice(__input);
12558            Bytes::new(&payload_buf)
12559        } else {
12560            Bytes::new(__input)
12561        };
12562        let mut __struct = Self::default();
12563        let tmp = buf.get_u32_le();
12564        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12565            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12566                flag_type: "GimbalManagerFlags",
12567                value: tmp as u32,
12568            })?;
12569        for v in &mut __struct.q {
12570            let val = buf.get_f32_le();
12571            *v = val;
12572        }
12573        __struct.angular_velocity_x = buf.get_f32_le();
12574        __struct.angular_velocity_y = buf.get_f32_le();
12575        __struct.angular_velocity_z = buf.get_f32_le();
12576        __struct.target_system = buf.get_u8();
12577        __struct.target_component = buf.get_u8();
12578        __struct.gimbal_device_id = buf.get_u8();
12579        Ok(__struct)
12580    }
12581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12582        let mut __tmp = BytesMut::new(bytes);
12583        #[allow(clippy::absurd_extreme_comparisons)]
12584        #[allow(unused_comparisons)]
12585        if __tmp.remaining() < Self::ENCODED_LEN {
12586            panic!(
12587                "buffer is too small (need {} bytes, but got {})",
12588                Self::ENCODED_LEN,
12589                __tmp.remaining(),
12590            )
12591        }
12592        __tmp.put_u32_le(self.flags.bits());
12593        for val in &self.q {
12594            __tmp.put_f32_le(*val);
12595        }
12596        __tmp.put_f32_le(self.angular_velocity_x);
12597        __tmp.put_f32_le(self.angular_velocity_y);
12598        __tmp.put_f32_le(self.angular_velocity_z);
12599        __tmp.put_u8(self.target_system);
12600        __tmp.put_u8(self.target_component);
12601        __tmp.put_u8(self.gimbal_device_id);
12602        if matches!(version, MavlinkVersion::V2) {
12603            let len = __tmp.len();
12604            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12605        } else {
12606            __tmp.len()
12607        }
12608    }
12609}
12610#[doc = "id: 288"]
12611#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12612#[derive(Debug, Clone, PartialEq)]
12613#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12614#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12615pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12616    #[doc = "High level gimbal manager flags."]
12617    pub flags: GimbalManagerFlags,
12618    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12619    pub pitch: f32,
12620    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12621    pub yaw: f32,
12622    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12623    pub pitch_rate: f32,
12624    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12625    pub yaw_rate: f32,
12626    #[doc = "System ID"]
12627    pub target_system: u8,
12628    #[doc = "Component ID"]
12629    pub target_component: u8,
12630    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12631    pub gimbal_device_id: u8,
12632}
12633impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12634    pub const ENCODED_LEN: usize = 23usize;
12635    pub const DEFAULT: Self = Self {
12636        flags: GimbalManagerFlags::DEFAULT,
12637        pitch: 0.0_f32,
12638        yaw: 0.0_f32,
12639        pitch_rate: 0.0_f32,
12640        yaw_rate: 0.0_f32,
12641        target_system: 0_u8,
12642        target_component: 0_u8,
12643        gimbal_device_id: 0_u8,
12644    };
12645    #[cfg(feature = "arbitrary")]
12646    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12647        use arbitrary::{Arbitrary, Unstructured};
12648        let mut buf = [0u8; 1024];
12649        rng.fill_bytes(&mut buf);
12650        let mut unstructured = Unstructured::new(&buf);
12651        Self::arbitrary(&mut unstructured).unwrap_or_default()
12652    }
12653}
12654impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12655    fn default() -> Self {
12656        Self::DEFAULT.clone()
12657    }
12658}
12659impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12660    type Message = MavMessage;
12661    const ID: u32 = 288u32;
12662    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12663    const EXTRA_CRC: u8 = 20u8;
12664    const ENCODED_LEN: usize = 23usize;
12665    fn deser(
12666        _version: MavlinkVersion,
12667        __input: &[u8],
12668    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12669        let avail_len = __input.len();
12670        let mut payload_buf = [0; Self::ENCODED_LEN];
12671        let mut buf = if avail_len < Self::ENCODED_LEN {
12672            payload_buf[0..avail_len].copy_from_slice(__input);
12673            Bytes::new(&payload_buf)
12674        } else {
12675            Bytes::new(__input)
12676        };
12677        let mut __struct = Self::default();
12678        let tmp = buf.get_u32_le();
12679        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12680            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12681                flag_type: "GimbalManagerFlags",
12682                value: tmp as u32,
12683            })?;
12684        __struct.pitch = buf.get_f32_le();
12685        __struct.yaw = buf.get_f32_le();
12686        __struct.pitch_rate = buf.get_f32_le();
12687        __struct.yaw_rate = buf.get_f32_le();
12688        __struct.target_system = buf.get_u8();
12689        __struct.target_component = buf.get_u8();
12690        __struct.gimbal_device_id = buf.get_u8();
12691        Ok(__struct)
12692    }
12693    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12694        let mut __tmp = BytesMut::new(bytes);
12695        #[allow(clippy::absurd_extreme_comparisons)]
12696        #[allow(unused_comparisons)]
12697        if __tmp.remaining() < Self::ENCODED_LEN {
12698            panic!(
12699                "buffer is too small (need {} bytes, but got {})",
12700                Self::ENCODED_LEN,
12701                __tmp.remaining(),
12702            )
12703        }
12704        __tmp.put_u32_le(self.flags.bits());
12705        __tmp.put_f32_le(self.pitch);
12706        __tmp.put_f32_le(self.yaw);
12707        __tmp.put_f32_le(self.pitch_rate);
12708        __tmp.put_f32_le(self.yaw_rate);
12709        __tmp.put_u8(self.target_system);
12710        __tmp.put_u8(self.target_component);
12711        __tmp.put_u8(self.gimbal_device_id);
12712        if matches!(version, MavlinkVersion::V2) {
12713            let len = __tmp.len();
12714            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12715        } else {
12716            __tmp.len()
12717        }
12718    }
12719}
12720#[doc = "id: 287"]
12721#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
12722#[derive(Debug, Clone, PartialEq)]
12723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12725pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12726    #[doc = "High level gimbal manager flags to use."]
12727    pub flags: GimbalManagerFlags,
12728    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
12729    pub pitch: f32,
12730    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
12731    pub yaw: f32,
12732    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
12733    pub pitch_rate: f32,
12734    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
12735    pub yaw_rate: f32,
12736    #[doc = "System ID"]
12737    pub target_system: u8,
12738    #[doc = "Component ID"]
12739    pub target_component: u8,
12740    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12741    pub gimbal_device_id: u8,
12742}
12743impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12744    pub const ENCODED_LEN: usize = 23usize;
12745    pub const DEFAULT: Self = Self {
12746        flags: GimbalManagerFlags::DEFAULT,
12747        pitch: 0.0_f32,
12748        yaw: 0.0_f32,
12749        pitch_rate: 0.0_f32,
12750        yaw_rate: 0.0_f32,
12751        target_system: 0_u8,
12752        target_component: 0_u8,
12753        gimbal_device_id: 0_u8,
12754    };
12755    #[cfg(feature = "arbitrary")]
12756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12757        use arbitrary::{Arbitrary, Unstructured};
12758        let mut buf = [0u8; 1024];
12759        rng.fill_bytes(&mut buf);
12760        let mut unstructured = Unstructured::new(&buf);
12761        Self::arbitrary(&mut unstructured).unwrap_or_default()
12762    }
12763}
12764impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12765    fn default() -> Self {
12766        Self::DEFAULT.clone()
12767    }
12768}
12769impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12770    type Message = MavMessage;
12771    const ID: u32 = 287u32;
12772    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
12773    const EXTRA_CRC: u8 = 1u8;
12774    const ENCODED_LEN: usize = 23usize;
12775    fn deser(
12776        _version: MavlinkVersion,
12777        __input: &[u8],
12778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12779        let avail_len = __input.len();
12780        let mut payload_buf = [0; Self::ENCODED_LEN];
12781        let mut buf = if avail_len < Self::ENCODED_LEN {
12782            payload_buf[0..avail_len].copy_from_slice(__input);
12783            Bytes::new(&payload_buf)
12784        } else {
12785            Bytes::new(__input)
12786        };
12787        let mut __struct = Self::default();
12788        let tmp = buf.get_u32_le();
12789        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12790            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12791                flag_type: "GimbalManagerFlags",
12792                value: tmp as u32,
12793            })?;
12794        __struct.pitch = buf.get_f32_le();
12795        __struct.yaw = buf.get_f32_le();
12796        __struct.pitch_rate = buf.get_f32_le();
12797        __struct.yaw_rate = buf.get_f32_le();
12798        __struct.target_system = buf.get_u8();
12799        __struct.target_component = buf.get_u8();
12800        __struct.gimbal_device_id = buf.get_u8();
12801        Ok(__struct)
12802    }
12803    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12804        let mut __tmp = BytesMut::new(bytes);
12805        #[allow(clippy::absurd_extreme_comparisons)]
12806        #[allow(unused_comparisons)]
12807        if __tmp.remaining() < Self::ENCODED_LEN {
12808            panic!(
12809                "buffer is too small (need {} bytes, but got {})",
12810                Self::ENCODED_LEN,
12811                __tmp.remaining(),
12812            )
12813        }
12814        __tmp.put_u32_le(self.flags.bits());
12815        __tmp.put_f32_le(self.pitch);
12816        __tmp.put_f32_le(self.yaw);
12817        __tmp.put_f32_le(self.pitch_rate);
12818        __tmp.put_f32_le(self.yaw_rate);
12819        __tmp.put_u8(self.target_system);
12820        __tmp.put_u8(self.target_component);
12821        __tmp.put_u8(self.gimbal_device_id);
12822        if matches!(version, MavlinkVersion::V2) {
12823            let len = __tmp.len();
12824            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12825        } else {
12826            __tmp.len()
12827        }
12828    }
12829}
12830#[doc = "id: 281"]
12831#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
12832#[derive(Debug, Clone, PartialEq)]
12833#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12834#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12835pub struct GIMBAL_MANAGER_STATUS_DATA {
12836    #[doc = "Timestamp (time since system boot)."]
12837    pub time_boot_ms: u32,
12838    #[doc = "High level gimbal manager flags currently applied."]
12839    pub flags: GimbalManagerFlags,
12840    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12841    pub gimbal_device_id: u8,
12842    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
12843    pub primary_control_sysid: u8,
12844    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
12845    pub primary_control_compid: u8,
12846    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
12847    pub secondary_control_sysid: u8,
12848    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
12849    pub secondary_control_compid: u8,
12850}
12851impl GIMBAL_MANAGER_STATUS_DATA {
12852    pub const ENCODED_LEN: usize = 13usize;
12853    pub const DEFAULT: Self = Self {
12854        time_boot_ms: 0_u32,
12855        flags: GimbalManagerFlags::DEFAULT,
12856        gimbal_device_id: 0_u8,
12857        primary_control_sysid: 0_u8,
12858        primary_control_compid: 0_u8,
12859        secondary_control_sysid: 0_u8,
12860        secondary_control_compid: 0_u8,
12861    };
12862    #[cfg(feature = "arbitrary")]
12863    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12864        use arbitrary::{Arbitrary, Unstructured};
12865        let mut buf = [0u8; 1024];
12866        rng.fill_bytes(&mut buf);
12867        let mut unstructured = Unstructured::new(&buf);
12868        Self::arbitrary(&mut unstructured).unwrap_or_default()
12869    }
12870}
12871impl Default for GIMBAL_MANAGER_STATUS_DATA {
12872    fn default() -> Self {
12873        Self::DEFAULT.clone()
12874    }
12875}
12876impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
12877    type Message = MavMessage;
12878    const ID: u32 = 281u32;
12879    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
12880    const EXTRA_CRC: u8 = 48u8;
12881    const ENCODED_LEN: usize = 13usize;
12882    fn deser(
12883        _version: MavlinkVersion,
12884        __input: &[u8],
12885    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12886        let avail_len = __input.len();
12887        let mut payload_buf = [0; Self::ENCODED_LEN];
12888        let mut buf = if avail_len < Self::ENCODED_LEN {
12889            payload_buf[0..avail_len].copy_from_slice(__input);
12890            Bytes::new(&payload_buf)
12891        } else {
12892            Bytes::new(__input)
12893        };
12894        let mut __struct = Self::default();
12895        __struct.time_boot_ms = buf.get_u32_le();
12896        let tmp = buf.get_u32_le();
12897        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12898            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12899                flag_type: "GimbalManagerFlags",
12900                value: tmp as u32,
12901            })?;
12902        __struct.gimbal_device_id = buf.get_u8();
12903        __struct.primary_control_sysid = buf.get_u8();
12904        __struct.primary_control_compid = buf.get_u8();
12905        __struct.secondary_control_sysid = buf.get_u8();
12906        __struct.secondary_control_compid = buf.get_u8();
12907        Ok(__struct)
12908    }
12909    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12910        let mut __tmp = BytesMut::new(bytes);
12911        #[allow(clippy::absurd_extreme_comparisons)]
12912        #[allow(unused_comparisons)]
12913        if __tmp.remaining() < Self::ENCODED_LEN {
12914            panic!(
12915                "buffer is too small (need {} bytes, but got {})",
12916                Self::ENCODED_LEN,
12917                __tmp.remaining(),
12918            )
12919        }
12920        __tmp.put_u32_le(self.time_boot_ms);
12921        __tmp.put_u32_le(self.flags.bits());
12922        __tmp.put_u8(self.gimbal_device_id);
12923        __tmp.put_u8(self.primary_control_sysid);
12924        __tmp.put_u8(self.primary_control_compid);
12925        __tmp.put_u8(self.secondary_control_sysid);
12926        __tmp.put_u8(self.secondary_control_compid);
12927        if matches!(version, MavlinkVersion::V2) {
12928            let len = __tmp.len();
12929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12930        } else {
12931            __tmp.len()
12932        }
12933    }
12934}
12935#[doc = "id: 33"]
12936#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
12937#[derive(Debug, Clone, PartialEq)]
12938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12940pub struct GLOBAL_POSITION_INT_DATA {
12941    #[doc = "Timestamp (time since system boot)."]
12942    pub time_boot_ms: u32,
12943    #[doc = "Latitude, expressed"]
12944    pub lat: i32,
12945    #[doc = "Longitude, expressed"]
12946    pub lon: i32,
12947    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
12948    pub alt: i32,
12949    #[doc = "Altitude above home"]
12950    pub relative_alt: i32,
12951    #[doc = "Ground X Speed (Latitude, positive north)"]
12952    pub vx: i16,
12953    #[doc = "Ground Y Speed (Longitude, positive east)"]
12954    pub vy: i16,
12955    #[doc = "Ground Z Speed (Altitude, positive down)"]
12956    pub vz: i16,
12957    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
12958    pub hdg: u16,
12959}
12960impl GLOBAL_POSITION_INT_DATA {
12961    pub const ENCODED_LEN: usize = 28usize;
12962    pub const DEFAULT: Self = Self {
12963        time_boot_ms: 0_u32,
12964        lat: 0_i32,
12965        lon: 0_i32,
12966        alt: 0_i32,
12967        relative_alt: 0_i32,
12968        vx: 0_i16,
12969        vy: 0_i16,
12970        vz: 0_i16,
12971        hdg: 0_u16,
12972    };
12973    #[cfg(feature = "arbitrary")]
12974    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12975        use arbitrary::{Arbitrary, Unstructured};
12976        let mut buf = [0u8; 1024];
12977        rng.fill_bytes(&mut buf);
12978        let mut unstructured = Unstructured::new(&buf);
12979        Self::arbitrary(&mut unstructured).unwrap_or_default()
12980    }
12981}
12982impl Default for GLOBAL_POSITION_INT_DATA {
12983    fn default() -> Self {
12984        Self::DEFAULT.clone()
12985    }
12986}
12987impl MessageData for GLOBAL_POSITION_INT_DATA {
12988    type Message = MavMessage;
12989    const ID: u32 = 33u32;
12990    const NAME: &'static str = "GLOBAL_POSITION_INT";
12991    const EXTRA_CRC: u8 = 104u8;
12992    const ENCODED_LEN: usize = 28usize;
12993    fn deser(
12994        _version: MavlinkVersion,
12995        __input: &[u8],
12996    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12997        let avail_len = __input.len();
12998        let mut payload_buf = [0; Self::ENCODED_LEN];
12999        let mut buf = if avail_len < Self::ENCODED_LEN {
13000            payload_buf[0..avail_len].copy_from_slice(__input);
13001            Bytes::new(&payload_buf)
13002        } else {
13003            Bytes::new(__input)
13004        };
13005        let mut __struct = Self::default();
13006        __struct.time_boot_ms = buf.get_u32_le();
13007        __struct.lat = buf.get_i32_le();
13008        __struct.lon = buf.get_i32_le();
13009        __struct.alt = buf.get_i32_le();
13010        __struct.relative_alt = buf.get_i32_le();
13011        __struct.vx = buf.get_i16_le();
13012        __struct.vy = buf.get_i16_le();
13013        __struct.vz = buf.get_i16_le();
13014        __struct.hdg = buf.get_u16_le();
13015        Ok(__struct)
13016    }
13017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13018        let mut __tmp = BytesMut::new(bytes);
13019        #[allow(clippy::absurd_extreme_comparisons)]
13020        #[allow(unused_comparisons)]
13021        if __tmp.remaining() < Self::ENCODED_LEN {
13022            panic!(
13023                "buffer is too small (need {} bytes, but got {})",
13024                Self::ENCODED_LEN,
13025                __tmp.remaining(),
13026            )
13027        }
13028        __tmp.put_u32_le(self.time_boot_ms);
13029        __tmp.put_i32_le(self.lat);
13030        __tmp.put_i32_le(self.lon);
13031        __tmp.put_i32_le(self.alt);
13032        __tmp.put_i32_le(self.relative_alt);
13033        __tmp.put_i16_le(self.vx);
13034        __tmp.put_i16_le(self.vy);
13035        __tmp.put_i16_le(self.vz);
13036        __tmp.put_u16_le(self.hdg);
13037        if matches!(version, MavlinkVersion::V2) {
13038            let len = __tmp.len();
13039            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13040        } else {
13041            __tmp.len()
13042        }
13043    }
13044}
13045#[doc = "id: 63"]
13046#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
13047#[derive(Debug, Clone, PartialEq)]
13048#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13049#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13050pub struct GLOBAL_POSITION_INT_COV_DATA {
13051    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13052    pub time_usec: u64,
13053    #[doc = "Latitude"]
13054    pub lat: i32,
13055    #[doc = "Longitude"]
13056    pub lon: i32,
13057    #[doc = "Altitude in meters above MSL"]
13058    pub alt: i32,
13059    #[doc = "Altitude above ground"]
13060    pub relative_alt: i32,
13061    #[doc = "Ground X Speed (Latitude)"]
13062    pub vx: f32,
13063    #[doc = "Ground Y Speed (Longitude)"]
13064    pub vy: f32,
13065    #[doc = "Ground Z Speed (Altitude)"]
13066    pub vz: f32,
13067    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
13068    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13069    pub covariance: [f32; 36],
13070    #[doc = "Class id of the estimator this estimate originated from."]
13071    pub estimator_type: MavEstimatorType,
13072}
13073impl GLOBAL_POSITION_INT_COV_DATA {
13074    pub const ENCODED_LEN: usize = 181usize;
13075    pub const DEFAULT: Self = Self {
13076        time_usec: 0_u64,
13077        lat: 0_i32,
13078        lon: 0_i32,
13079        alt: 0_i32,
13080        relative_alt: 0_i32,
13081        vx: 0.0_f32,
13082        vy: 0.0_f32,
13083        vz: 0.0_f32,
13084        covariance: [0.0_f32; 36usize],
13085        estimator_type: MavEstimatorType::DEFAULT,
13086    };
13087    #[cfg(feature = "arbitrary")]
13088    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13089        use arbitrary::{Arbitrary, Unstructured};
13090        let mut buf = [0u8; 1024];
13091        rng.fill_bytes(&mut buf);
13092        let mut unstructured = Unstructured::new(&buf);
13093        Self::arbitrary(&mut unstructured).unwrap_or_default()
13094    }
13095}
13096impl Default for GLOBAL_POSITION_INT_COV_DATA {
13097    fn default() -> Self {
13098        Self::DEFAULT.clone()
13099    }
13100}
13101impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
13102    type Message = MavMessage;
13103    const ID: u32 = 63u32;
13104    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
13105    const EXTRA_CRC: u8 = 119u8;
13106    const ENCODED_LEN: usize = 181usize;
13107    fn deser(
13108        _version: MavlinkVersion,
13109        __input: &[u8],
13110    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13111        let avail_len = __input.len();
13112        let mut payload_buf = [0; Self::ENCODED_LEN];
13113        let mut buf = if avail_len < Self::ENCODED_LEN {
13114            payload_buf[0..avail_len].copy_from_slice(__input);
13115            Bytes::new(&payload_buf)
13116        } else {
13117            Bytes::new(__input)
13118        };
13119        let mut __struct = Self::default();
13120        __struct.time_usec = buf.get_u64_le();
13121        __struct.lat = buf.get_i32_le();
13122        __struct.lon = buf.get_i32_le();
13123        __struct.alt = buf.get_i32_le();
13124        __struct.relative_alt = buf.get_i32_le();
13125        __struct.vx = buf.get_f32_le();
13126        __struct.vy = buf.get_f32_le();
13127        __struct.vz = buf.get_f32_le();
13128        for v in &mut __struct.covariance {
13129            let val = buf.get_f32_le();
13130            *v = val;
13131        }
13132        let tmp = buf.get_u8();
13133        __struct.estimator_type =
13134            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13135                enum_type: "MavEstimatorType",
13136                value: tmp as u32,
13137            })?;
13138        Ok(__struct)
13139    }
13140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13141        let mut __tmp = BytesMut::new(bytes);
13142        #[allow(clippy::absurd_extreme_comparisons)]
13143        #[allow(unused_comparisons)]
13144        if __tmp.remaining() < Self::ENCODED_LEN {
13145            panic!(
13146                "buffer is too small (need {} bytes, but got {})",
13147                Self::ENCODED_LEN,
13148                __tmp.remaining(),
13149            )
13150        }
13151        __tmp.put_u64_le(self.time_usec);
13152        __tmp.put_i32_le(self.lat);
13153        __tmp.put_i32_le(self.lon);
13154        __tmp.put_i32_le(self.alt);
13155        __tmp.put_i32_le(self.relative_alt);
13156        __tmp.put_f32_le(self.vx);
13157        __tmp.put_f32_le(self.vy);
13158        __tmp.put_f32_le(self.vz);
13159        for val in &self.covariance {
13160            __tmp.put_f32_le(*val);
13161        }
13162        __tmp.put_u8(self.estimator_type as u8);
13163        if matches!(version, MavlinkVersion::V2) {
13164            let len = __tmp.len();
13165            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13166        } else {
13167            __tmp.len()
13168        }
13169    }
13170}
13171#[doc = "id: 101"]
13172#[doc = "Global position/attitude estimate from a vision source."]
13173#[derive(Debug, Clone, PartialEq)]
13174#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13176pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13177    #[doc = "Timestamp (UNIX time or since system boot)"]
13178    pub usec: u64,
13179    #[doc = "Global X position"]
13180    pub x: f32,
13181    #[doc = "Global Y position"]
13182    pub y: f32,
13183    #[doc = "Global Z position"]
13184    pub z: f32,
13185    #[doc = "Roll angle"]
13186    pub roll: f32,
13187    #[doc = "Pitch angle"]
13188    pub pitch: f32,
13189    #[doc = "Yaw angle"]
13190    pub yaw: f32,
13191    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13192    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13193    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13194    pub covariance: [f32; 21],
13195    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13196    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13197    pub reset_counter: u8,
13198}
13199impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13200    pub const ENCODED_LEN: usize = 117usize;
13201    pub const DEFAULT: Self = Self {
13202        usec: 0_u64,
13203        x: 0.0_f32,
13204        y: 0.0_f32,
13205        z: 0.0_f32,
13206        roll: 0.0_f32,
13207        pitch: 0.0_f32,
13208        yaw: 0.0_f32,
13209        covariance: [0.0_f32; 21usize],
13210        reset_counter: 0_u8,
13211    };
13212    #[cfg(feature = "arbitrary")]
13213    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13214        use arbitrary::{Arbitrary, Unstructured};
13215        let mut buf = [0u8; 1024];
13216        rng.fill_bytes(&mut buf);
13217        let mut unstructured = Unstructured::new(&buf);
13218        Self::arbitrary(&mut unstructured).unwrap_or_default()
13219    }
13220}
13221impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13222    fn default() -> Self {
13223        Self::DEFAULT.clone()
13224    }
13225}
13226impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13227    type Message = MavMessage;
13228    const ID: u32 = 101u32;
13229    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13230    const EXTRA_CRC: u8 = 102u8;
13231    const ENCODED_LEN: usize = 117usize;
13232    fn deser(
13233        _version: MavlinkVersion,
13234        __input: &[u8],
13235    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13236        let avail_len = __input.len();
13237        let mut payload_buf = [0; Self::ENCODED_LEN];
13238        let mut buf = if avail_len < Self::ENCODED_LEN {
13239            payload_buf[0..avail_len].copy_from_slice(__input);
13240            Bytes::new(&payload_buf)
13241        } else {
13242            Bytes::new(__input)
13243        };
13244        let mut __struct = Self::default();
13245        __struct.usec = buf.get_u64_le();
13246        __struct.x = buf.get_f32_le();
13247        __struct.y = buf.get_f32_le();
13248        __struct.z = buf.get_f32_le();
13249        __struct.roll = buf.get_f32_le();
13250        __struct.pitch = buf.get_f32_le();
13251        __struct.yaw = buf.get_f32_le();
13252        for v in &mut __struct.covariance {
13253            let val = buf.get_f32_le();
13254            *v = val;
13255        }
13256        __struct.reset_counter = buf.get_u8();
13257        Ok(__struct)
13258    }
13259    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13260        let mut __tmp = BytesMut::new(bytes);
13261        #[allow(clippy::absurd_extreme_comparisons)]
13262        #[allow(unused_comparisons)]
13263        if __tmp.remaining() < Self::ENCODED_LEN {
13264            panic!(
13265                "buffer is too small (need {} bytes, but got {})",
13266                Self::ENCODED_LEN,
13267                __tmp.remaining(),
13268            )
13269        }
13270        __tmp.put_u64_le(self.usec);
13271        __tmp.put_f32_le(self.x);
13272        __tmp.put_f32_le(self.y);
13273        __tmp.put_f32_le(self.z);
13274        __tmp.put_f32_le(self.roll);
13275        __tmp.put_f32_le(self.pitch);
13276        __tmp.put_f32_le(self.yaw);
13277        for val in &self.covariance {
13278            __tmp.put_f32_le(*val);
13279        }
13280        __tmp.put_u8(self.reset_counter);
13281        if matches!(version, MavlinkVersion::V2) {
13282            let len = __tmp.len();
13283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13284        } else {
13285            __tmp.len()
13286        }
13287    }
13288}
13289#[doc = "id: 124"]
13290#[doc = "Second GPS data."]
13291#[derive(Debug, Clone, PartialEq)]
13292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13294pub struct GPS2_RAW_DATA {
13295    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13296    pub time_usec: u64,
13297    #[doc = "Latitude (WGS84)"]
13298    pub lat: i32,
13299    #[doc = "Longitude (WGS84)"]
13300    pub lon: i32,
13301    #[doc = "Altitude (MSL). Positive for up."]
13302    pub alt: i32,
13303    #[doc = "Age of DGPS info"]
13304    pub dgps_age: u32,
13305    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13306    pub eph: u16,
13307    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13308    pub epv: u16,
13309    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13310    pub vel: u16,
13311    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13312    pub cog: u16,
13313    #[doc = "GPS fix type."]
13314    pub fix_type: GpsFixType,
13315    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13316    pub satellites_visible: u8,
13317    #[doc = "Number of DGPS satellites"]
13318    pub dgps_numch: u8,
13319    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13320    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13321    pub yaw: u16,
13322    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13323    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13324    pub alt_ellipsoid: i32,
13325    #[doc = "Position uncertainty."]
13326    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13327    pub h_acc: u32,
13328    #[doc = "Altitude uncertainty."]
13329    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13330    pub v_acc: u32,
13331    #[doc = "Speed uncertainty."]
13332    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13333    pub vel_acc: u32,
13334    #[doc = "Heading / track uncertainty"]
13335    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13336    pub hdg_acc: u32,
13337}
13338impl GPS2_RAW_DATA {
13339    pub const ENCODED_LEN: usize = 57usize;
13340    pub const DEFAULT: Self = Self {
13341        time_usec: 0_u64,
13342        lat: 0_i32,
13343        lon: 0_i32,
13344        alt: 0_i32,
13345        dgps_age: 0_u32,
13346        eph: 0_u16,
13347        epv: 0_u16,
13348        vel: 0_u16,
13349        cog: 0_u16,
13350        fix_type: GpsFixType::DEFAULT,
13351        satellites_visible: 0_u8,
13352        dgps_numch: 0_u8,
13353        yaw: 0_u16,
13354        alt_ellipsoid: 0_i32,
13355        h_acc: 0_u32,
13356        v_acc: 0_u32,
13357        vel_acc: 0_u32,
13358        hdg_acc: 0_u32,
13359    };
13360    #[cfg(feature = "arbitrary")]
13361    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13362        use arbitrary::{Arbitrary, Unstructured};
13363        let mut buf = [0u8; 1024];
13364        rng.fill_bytes(&mut buf);
13365        let mut unstructured = Unstructured::new(&buf);
13366        Self::arbitrary(&mut unstructured).unwrap_or_default()
13367    }
13368}
13369impl Default for GPS2_RAW_DATA {
13370    fn default() -> Self {
13371        Self::DEFAULT.clone()
13372    }
13373}
13374impl MessageData for GPS2_RAW_DATA {
13375    type Message = MavMessage;
13376    const ID: u32 = 124u32;
13377    const NAME: &'static str = "GPS2_RAW";
13378    const EXTRA_CRC: u8 = 87u8;
13379    const ENCODED_LEN: usize = 57usize;
13380    fn deser(
13381        _version: MavlinkVersion,
13382        __input: &[u8],
13383    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13384        let avail_len = __input.len();
13385        let mut payload_buf = [0; Self::ENCODED_LEN];
13386        let mut buf = if avail_len < Self::ENCODED_LEN {
13387            payload_buf[0..avail_len].copy_from_slice(__input);
13388            Bytes::new(&payload_buf)
13389        } else {
13390            Bytes::new(__input)
13391        };
13392        let mut __struct = Self::default();
13393        __struct.time_usec = buf.get_u64_le();
13394        __struct.lat = buf.get_i32_le();
13395        __struct.lon = buf.get_i32_le();
13396        __struct.alt = buf.get_i32_le();
13397        __struct.dgps_age = buf.get_u32_le();
13398        __struct.eph = buf.get_u16_le();
13399        __struct.epv = buf.get_u16_le();
13400        __struct.vel = buf.get_u16_le();
13401        __struct.cog = buf.get_u16_le();
13402        let tmp = buf.get_u8();
13403        __struct.fix_type =
13404            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13405                enum_type: "GpsFixType",
13406                value: tmp as u32,
13407            })?;
13408        __struct.satellites_visible = buf.get_u8();
13409        __struct.dgps_numch = buf.get_u8();
13410        __struct.yaw = buf.get_u16_le();
13411        __struct.alt_ellipsoid = buf.get_i32_le();
13412        __struct.h_acc = buf.get_u32_le();
13413        __struct.v_acc = buf.get_u32_le();
13414        __struct.vel_acc = buf.get_u32_le();
13415        __struct.hdg_acc = buf.get_u32_le();
13416        Ok(__struct)
13417    }
13418    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13419        let mut __tmp = BytesMut::new(bytes);
13420        #[allow(clippy::absurd_extreme_comparisons)]
13421        #[allow(unused_comparisons)]
13422        if __tmp.remaining() < Self::ENCODED_LEN {
13423            panic!(
13424                "buffer is too small (need {} bytes, but got {})",
13425                Self::ENCODED_LEN,
13426                __tmp.remaining(),
13427            )
13428        }
13429        __tmp.put_u64_le(self.time_usec);
13430        __tmp.put_i32_le(self.lat);
13431        __tmp.put_i32_le(self.lon);
13432        __tmp.put_i32_le(self.alt);
13433        __tmp.put_u32_le(self.dgps_age);
13434        __tmp.put_u16_le(self.eph);
13435        __tmp.put_u16_le(self.epv);
13436        __tmp.put_u16_le(self.vel);
13437        __tmp.put_u16_le(self.cog);
13438        __tmp.put_u8(self.fix_type as u8);
13439        __tmp.put_u8(self.satellites_visible);
13440        __tmp.put_u8(self.dgps_numch);
13441        __tmp.put_u16_le(self.yaw);
13442        __tmp.put_i32_le(self.alt_ellipsoid);
13443        __tmp.put_u32_le(self.h_acc);
13444        __tmp.put_u32_le(self.v_acc);
13445        __tmp.put_u32_le(self.vel_acc);
13446        __tmp.put_u32_le(self.hdg_acc);
13447        if matches!(version, MavlinkVersion::V2) {
13448            let len = __tmp.len();
13449            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13450        } else {
13451            __tmp.len()
13452        }
13453    }
13454}
13455#[doc = "id: 128"]
13456#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13457#[derive(Debug, Clone, PartialEq)]
13458#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13459#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13460pub struct GPS2_RTK_DATA {
13461    #[doc = "Time since boot of last baseline message received."]
13462    pub time_last_baseline_ms: u32,
13463    #[doc = "GPS Time of Week of last baseline"]
13464    pub tow: u32,
13465    #[doc = "Current baseline in ECEF x or NED north component."]
13466    pub baseline_a_mm: i32,
13467    #[doc = "Current baseline in ECEF y or NED east component."]
13468    pub baseline_b_mm: i32,
13469    #[doc = "Current baseline in ECEF z or NED down component."]
13470    pub baseline_c_mm: i32,
13471    #[doc = "Current estimate of baseline accuracy."]
13472    pub accuracy: u32,
13473    #[doc = "Current number of integer ambiguity hypotheses."]
13474    pub iar_num_hypotheses: i32,
13475    #[doc = "GPS Week Number of last baseline"]
13476    pub wn: u16,
13477    #[doc = "Identification of connected RTK receiver."]
13478    pub rtk_receiver_id: u8,
13479    #[doc = "GPS-specific health report for RTK data."]
13480    pub rtk_health: u8,
13481    #[doc = "Rate of baseline messages being received by GPS"]
13482    pub rtk_rate: u8,
13483    #[doc = "Current number of sats used for RTK calculation."]
13484    pub nsats: u8,
13485    #[doc = "Coordinate system of baseline"]
13486    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13487}
13488impl GPS2_RTK_DATA {
13489    pub const ENCODED_LEN: usize = 35usize;
13490    pub const DEFAULT: Self = Self {
13491        time_last_baseline_ms: 0_u32,
13492        tow: 0_u32,
13493        baseline_a_mm: 0_i32,
13494        baseline_b_mm: 0_i32,
13495        baseline_c_mm: 0_i32,
13496        accuracy: 0_u32,
13497        iar_num_hypotheses: 0_i32,
13498        wn: 0_u16,
13499        rtk_receiver_id: 0_u8,
13500        rtk_health: 0_u8,
13501        rtk_rate: 0_u8,
13502        nsats: 0_u8,
13503        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13504    };
13505    #[cfg(feature = "arbitrary")]
13506    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13507        use arbitrary::{Arbitrary, Unstructured};
13508        let mut buf = [0u8; 1024];
13509        rng.fill_bytes(&mut buf);
13510        let mut unstructured = Unstructured::new(&buf);
13511        Self::arbitrary(&mut unstructured).unwrap_or_default()
13512    }
13513}
13514impl Default for GPS2_RTK_DATA {
13515    fn default() -> Self {
13516        Self::DEFAULT.clone()
13517    }
13518}
13519impl MessageData for GPS2_RTK_DATA {
13520    type Message = MavMessage;
13521    const ID: u32 = 128u32;
13522    const NAME: &'static str = "GPS2_RTK";
13523    const EXTRA_CRC: u8 = 226u8;
13524    const ENCODED_LEN: usize = 35usize;
13525    fn deser(
13526        _version: MavlinkVersion,
13527        __input: &[u8],
13528    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13529        let avail_len = __input.len();
13530        let mut payload_buf = [0; Self::ENCODED_LEN];
13531        let mut buf = if avail_len < Self::ENCODED_LEN {
13532            payload_buf[0..avail_len].copy_from_slice(__input);
13533            Bytes::new(&payload_buf)
13534        } else {
13535            Bytes::new(__input)
13536        };
13537        let mut __struct = Self::default();
13538        __struct.time_last_baseline_ms = buf.get_u32_le();
13539        __struct.tow = buf.get_u32_le();
13540        __struct.baseline_a_mm = buf.get_i32_le();
13541        __struct.baseline_b_mm = buf.get_i32_le();
13542        __struct.baseline_c_mm = buf.get_i32_le();
13543        __struct.accuracy = buf.get_u32_le();
13544        __struct.iar_num_hypotheses = buf.get_i32_le();
13545        __struct.wn = buf.get_u16_le();
13546        __struct.rtk_receiver_id = buf.get_u8();
13547        __struct.rtk_health = buf.get_u8();
13548        __struct.rtk_rate = buf.get_u8();
13549        __struct.nsats = buf.get_u8();
13550        let tmp = buf.get_u8();
13551        __struct.baseline_coords_type =
13552            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13553                enum_type: "RtkBaselineCoordinateSystem",
13554                value: tmp as u32,
13555            })?;
13556        Ok(__struct)
13557    }
13558    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13559        let mut __tmp = BytesMut::new(bytes);
13560        #[allow(clippy::absurd_extreme_comparisons)]
13561        #[allow(unused_comparisons)]
13562        if __tmp.remaining() < Self::ENCODED_LEN {
13563            panic!(
13564                "buffer is too small (need {} bytes, but got {})",
13565                Self::ENCODED_LEN,
13566                __tmp.remaining(),
13567            )
13568        }
13569        __tmp.put_u32_le(self.time_last_baseline_ms);
13570        __tmp.put_u32_le(self.tow);
13571        __tmp.put_i32_le(self.baseline_a_mm);
13572        __tmp.put_i32_le(self.baseline_b_mm);
13573        __tmp.put_i32_le(self.baseline_c_mm);
13574        __tmp.put_u32_le(self.accuracy);
13575        __tmp.put_i32_le(self.iar_num_hypotheses);
13576        __tmp.put_u16_le(self.wn);
13577        __tmp.put_u8(self.rtk_receiver_id);
13578        __tmp.put_u8(self.rtk_health);
13579        __tmp.put_u8(self.rtk_rate);
13580        __tmp.put_u8(self.nsats);
13581        __tmp.put_u8(self.baseline_coords_type as u8);
13582        if matches!(version, MavlinkVersion::V2) {
13583            let len = __tmp.len();
13584            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13585        } else {
13586            __tmp.len()
13587        }
13588    }
13589}
13590#[doc = "id: 49"]
13591#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13592#[derive(Debug, Clone, PartialEq)]
13593#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13594#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13595pub struct GPS_GLOBAL_ORIGIN_DATA {
13596    #[doc = "Latitude (WGS84)"]
13597    pub latitude: i32,
13598    #[doc = "Longitude (WGS84)"]
13599    pub longitude: i32,
13600    #[doc = "Altitude (MSL). Positive for up."]
13601    pub altitude: i32,
13602    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13603    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13604    pub time_usec: u64,
13605}
13606impl GPS_GLOBAL_ORIGIN_DATA {
13607    pub const ENCODED_LEN: usize = 20usize;
13608    pub const DEFAULT: Self = Self {
13609        latitude: 0_i32,
13610        longitude: 0_i32,
13611        altitude: 0_i32,
13612        time_usec: 0_u64,
13613    };
13614    #[cfg(feature = "arbitrary")]
13615    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13616        use arbitrary::{Arbitrary, Unstructured};
13617        let mut buf = [0u8; 1024];
13618        rng.fill_bytes(&mut buf);
13619        let mut unstructured = Unstructured::new(&buf);
13620        Self::arbitrary(&mut unstructured).unwrap_or_default()
13621    }
13622}
13623impl Default for GPS_GLOBAL_ORIGIN_DATA {
13624    fn default() -> Self {
13625        Self::DEFAULT.clone()
13626    }
13627}
13628impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13629    type Message = MavMessage;
13630    const ID: u32 = 49u32;
13631    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13632    const EXTRA_CRC: u8 = 39u8;
13633    const ENCODED_LEN: usize = 20usize;
13634    fn deser(
13635        _version: MavlinkVersion,
13636        __input: &[u8],
13637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13638        let avail_len = __input.len();
13639        let mut payload_buf = [0; Self::ENCODED_LEN];
13640        let mut buf = if avail_len < Self::ENCODED_LEN {
13641            payload_buf[0..avail_len].copy_from_slice(__input);
13642            Bytes::new(&payload_buf)
13643        } else {
13644            Bytes::new(__input)
13645        };
13646        let mut __struct = Self::default();
13647        __struct.latitude = buf.get_i32_le();
13648        __struct.longitude = buf.get_i32_le();
13649        __struct.altitude = buf.get_i32_le();
13650        __struct.time_usec = buf.get_u64_le();
13651        Ok(__struct)
13652    }
13653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13654        let mut __tmp = BytesMut::new(bytes);
13655        #[allow(clippy::absurd_extreme_comparisons)]
13656        #[allow(unused_comparisons)]
13657        if __tmp.remaining() < Self::ENCODED_LEN {
13658            panic!(
13659                "buffer is too small (need {} bytes, but got {})",
13660                Self::ENCODED_LEN,
13661                __tmp.remaining(),
13662            )
13663        }
13664        __tmp.put_i32_le(self.latitude);
13665        __tmp.put_i32_le(self.longitude);
13666        __tmp.put_i32_le(self.altitude);
13667        __tmp.put_u64_le(self.time_usec);
13668        if matches!(version, MavlinkVersion::V2) {
13669            let len = __tmp.len();
13670            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13671        } else {
13672            __tmp.len()
13673        }
13674    }
13675}
13676#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
13677#[doc = "id: 123"]
13678#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
13679#[derive(Debug, Clone, PartialEq)]
13680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13682pub struct GPS_INJECT_DATA_DATA {
13683    #[doc = "System ID"]
13684    pub target_system: u8,
13685    #[doc = "Component ID"]
13686    pub target_component: u8,
13687    #[doc = "Data length"]
13688    pub len: u8,
13689    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
13690    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13691    pub data: [u8; 110],
13692}
13693impl GPS_INJECT_DATA_DATA {
13694    pub const ENCODED_LEN: usize = 113usize;
13695    pub const DEFAULT: Self = Self {
13696        target_system: 0_u8,
13697        target_component: 0_u8,
13698        len: 0_u8,
13699        data: [0_u8; 110usize],
13700    };
13701    #[cfg(feature = "arbitrary")]
13702    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13703        use arbitrary::{Arbitrary, Unstructured};
13704        let mut buf = [0u8; 1024];
13705        rng.fill_bytes(&mut buf);
13706        let mut unstructured = Unstructured::new(&buf);
13707        Self::arbitrary(&mut unstructured).unwrap_or_default()
13708    }
13709}
13710impl Default for GPS_INJECT_DATA_DATA {
13711    fn default() -> Self {
13712        Self::DEFAULT.clone()
13713    }
13714}
13715impl MessageData for GPS_INJECT_DATA_DATA {
13716    type Message = MavMessage;
13717    const ID: u32 = 123u32;
13718    const NAME: &'static str = "GPS_INJECT_DATA";
13719    const EXTRA_CRC: u8 = 250u8;
13720    const ENCODED_LEN: usize = 113usize;
13721    fn deser(
13722        _version: MavlinkVersion,
13723        __input: &[u8],
13724    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13725        let avail_len = __input.len();
13726        let mut payload_buf = [0; Self::ENCODED_LEN];
13727        let mut buf = if avail_len < Self::ENCODED_LEN {
13728            payload_buf[0..avail_len].copy_from_slice(__input);
13729            Bytes::new(&payload_buf)
13730        } else {
13731            Bytes::new(__input)
13732        };
13733        let mut __struct = Self::default();
13734        __struct.target_system = buf.get_u8();
13735        __struct.target_component = buf.get_u8();
13736        __struct.len = buf.get_u8();
13737        for v in &mut __struct.data {
13738            let val = buf.get_u8();
13739            *v = val;
13740        }
13741        Ok(__struct)
13742    }
13743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13744        let mut __tmp = BytesMut::new(bytes);
13745        #[allow(clippy::absurd_extreme_comparisons)]
13746        #[allow(unused_comparisons)]
13747        if __tmp.remaining() < Self::ENCODED_LEN {
13748            panic!(
13749                "buffer is too small (need {} bytes, but got {})",
13750                Self::ENCODED_LEN,
13751                __tmp.remaining(),
13752            )
13753        }
13754        __tmp.put_u8(self.target_system);
13755        __tmp.put_u8(self.target_component);
13756        __tmp.put_u8(self.len);
13757        for val in &self.data {
13758            __tmp.put_u8(*val);
13759        }
13760        if matches!(version, MavlinkVersion::V2) {
13761            let len = __tmp.len();
13762            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13763        } else {
13764            __tmp.len()
13765        }
13766    }
13767}
13768#[doc = "id: 232"]
13769#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
13770#[derive(Debug, Clone, PartialEq)]
13771#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13772#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13773pub struct GPS_INPUT_DATA {
13774    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13775    pub time_usec: u64,
13776    #[doc = "GPS time (from start of GPS week)"]
13777    pub time_week_ms: u32,
13778    #[doc = "Latitude (WGS84)"]
13779    pub lat: i32,
13780    #[doc = "Longitude (WGS84)"]
13781    pub lon: i32,
13782    #[doc = "Altitude (MSL). Positive for up."]
13783    pub alt: f32,
13784    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
13785    pub hdop: f32,
13786    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
13787    pub vdop: f32,
13788    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
13789    pub vn: f32,
13790    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
13791    pub ve: f32,
13792    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
13793    pub vd: f32,
13794    #[doc = "GPS speed accuracy"]
13795    pub speed_accuracy: f32,
13796    #[doc = "GPS horizontal accuracy"]
13797    pub horiz_accuracy: f32,
13798    #[doc = "GPS vertical accuracy"]
13799    pub vert_accuracy: f32,
13800    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
13801    pub ignore_flags: GpsInputIgnoreFlags,
13802    #[doc = "GPS week number"]
13803    pub time_week: u16,
13804    #[doc = "ID of the GPS for multiple GPS inputs"]
13805    pub gps_id: u8,
13806    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
13807    pub fix_type: u8,
13808    #[doc = "Number of satellites visible."]
13809    pub satellites_visible: u8,
13810    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
13811    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13812    pub yaw: u16,
13813}
13814impl GPS_INPUT_DATA {
13815    pub const ENCODED_LEN: usize = 65usize;
13816    pub const DEFAULT: Self = Self {
13817        time_usec: 0_u64,
13818        time_week_ms: 0_u32,
13819        lat: 0_i32,
13820        lon: 0_i32,
13821        alt: 0.0_f32,
13822        hdop: 0.0_f32,
13823        vdop: 0.0_f32,
13824        vn: 0.0_f32,
13825        ve: 0.0_f32,
13826        vd: 0.0_f32,
13827        speed_accuracy: 0.0_f32,
13828        horiz_accuracy: 0.0_f32,
13829        vert_accuracy: 0.0_f32,
13830        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
13831        time_week: 0_u16,
13832        gps_id: 0_u8,
13833        fix_type: 0_u8,
13834        satellites_visible: 0_u8,
13835        yaw: 0_u16,
13836    };
13837    #[cfg(feature = "arbitrary")]
13838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13839        use arbitrary::{Arbitrary, Unstructured};
13840        let mut buf = [0u8; 1024];
13841        rng.fill_bytes(&mut buf);
13842        let mut unstructured = Unstructured::new(&buf);
13843        Self::arbitrary(&mut unstructured).unwrap_or_default()
13844    }
13845}
13846impl Default for GPS_INPUT_DATA {
13847    fn default() -> Self {
13848        Self::DEFAULT.clone()
13849    }
13850}
13851impl MessageData for GPS_INPUT_DATA {
13852    type Message = MavMessage;
13853    const ID: u32 = 232u32;
13854    const NAME: &'static str = "GPS_INPUT";
13855    const EXTRA_CRC: u8 = 151u8;
13856    const ENCODED_LEN: usize = 65usize;
13857    fn deser(
13858        _version: MavlinkVersion,
13859        __input: &[u8],
13860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13861        let avail_len = __input.len();
13862        let mut payload_buf = [0; Self::ENCODED_LEN];
13863        let mut buf = if avail_len < Self::ENCODED_LEN {
13864            payload_buf[0..avail_len].copy_from_slice(__input);
13865            Bytes::new(&payload_buf)
13866        } else {
13867            Bytes::new(__input)
13868        };
13869        let mut __struct = Self::default();
13870        __struct.time_usec = buf.get_u64_le();
13871        __struct.time_week_ms = buf.get_u32_le();
13872        __struct.lat = buf.get_i32_le();
13873        __struct.lon = buf.get_i32_le();
13874        __struct.alt = buf.get_f32_le();
13875        __struct.hdop = buf.get_f32_le();
13876        __struct.vdop = buf.get_f32_le();
13877        __struct.vn = buf.get_f32_le();
13878        __struct.ve = buf.get_f32_le();
13879        __struct.vd = buf.get_f32_le();
13880        __struct.speed_accuracy = buf.get_f32_le();
13881        __struct.horiz_accuracy = buf.get_f32_le();
13882        __struct.vert_accuracy = buf.get_f32_le();
13883        let tmp = buf.get_u16_le();
13884        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
13885            tmp & GpsInputIgnoreFlags::all().bits(),
13886        )
13887        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13888            flag_type: "GpsInputIgnoreFlags",
13889            value: tmp as u32,
13890        })?;
13891        __struct.time_week = buf.get_u16_le();
13892        __struct.gps_id = buf.get_u8();
13893        __struct.fix_type = buf.get_u8();
13894        __struct.satellites_visible = buf.get_u8();
13895        __struct.yaw = buf.get_u16_le();
13896        Ok(__struct)
13897    }
13898    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13899        let mut __tmp = BytesMut::new(bytes);
13900        #[allow(clippy::absurd_extreme_comparisons)]
13901        #[allow(unused_comparisons)]
13902        if __tmp.remaining() < Self::ENCODED_LEN {
13903            panic!(
13904                "buffer is too small (need {} bytes, but got {})",
13905                Self::ENCODED_LEN,
13906                __tmp.remaining(),
13907            )
13908        }
13909        __tmp.put_u64_le(self.time_usec);
13910        __tmp.put_u32_le(self.time_week_ms);
13911        __tmp.put_i32_le(self.lat);
13912        __tmp.put_i32_le(self.lon);
13913        __tmp.put_f32_le(self.alt);
13914        __tmp.put_f32_le(self.hdop);
13915        __tmp.put_f32_le(self.vdop);
13916        __tmp.put_f32_le(self.vn);
13917        __tmp.put_f32_le(self.ve);
13918        __tmp.put_f32_le(self.vd);
13919        __tmp.put_f32_le(self.speed_accuracy);
13920        __tmp.put_f32_le(self.horiz_accuracy);
13921        __tmp.put_f32_le(self.vert_accuracy);
13922        __tmp.put_u16_le(self.ignore_flags.bits());
13923        __tmp.put_u16_le(self.time_week);
13924        __tmp.put_u8(self.gps_id);
13925        __tmp.put_u8(self.fix_type);
13926        __tmp.put_u8(self.satellites_visible);
13927        __tmp.put_u16_le(self.yaw);
13928        if matches!(version, MavlinkVersion::V2) {
13929            let len = __tmp.len();
13930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13931        } else {
13932            __tmp.len()
13933        }
13934    }
13935}
13936#[doc = "id: 24"]
13937#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
13938#[derive(Debug, Clone, PartialEq)]
13939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13941pub struct GPS_RAW_INT_DATA {
13942    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13943    pub time_usec: u64,
13944    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
13945    pub lat: i32,
13946    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
13947    pub lon: i32,
13948    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
13949    pub alt: i32,
13950    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13951    pub eph: u16,
13952    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13953    pub epv: u16,
13954    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13955    pub vel: u16,
13956    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13957    pub cog: u16,
13958    #[doc = "GPS fix type."]
13959    pub fix_type: GpsFixType,
13960    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13961    pub satellites_visible: u8,
13962    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13963    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13964    pub alt_ellipsoid: i32,
13965    #[doc = "Position uncertainty."]
13966    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13967    pub h_acc: u32,
13968    #[doc = "Altitude uncertainty."]
13969    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13970    pub v_acc: u32,
13971    #[doc = "Speed uncertainty."]
13972    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13973    pub vel_acc: u32,
13974    #[doc = "Heading / track uncertainty"]
13975    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13976    pub hdg_acc: u32,
13977    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13978    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13979    pub yaw: u16,
13980}
13981impl GPS_RAW_INT_DATA {
13982    pub const ENCODED_LEN: usize = 52usize;
13983    pub const DEFAULT: Self = Self {
13984        time_usec: 0_u64,
13985        lat: 0_i32,
13986        lon: 0_i32,
13987        alt: 0_i32,
13988        eph: 0_u16,
13989        epv: 0_u16,
13990        vel: 0_u16,
13991        cog: 0_u16,
13992        fix_type: GpsFixType::DEFAULT,
13993        satellites_visible: 0_u8,
13994        alt_ellipsoid: 0_i32,
13995        h_acc: 0_u32,
13996        v_acc: 0_u32,
13997        vel_acc: 0_u32,
13998        hdg_acc: 0_u32,
13999        yaw: 0_u16,
14000    };
14001    #[cfg(feature = "arbitrary")]
14002    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14003        use arbitrary::{Arbitrary, Unstructured};
14004        let mut buf = [0u8; 1024];
14005        rng.fill_bytes(&mut buf);
14006        let mut unstructured = Unstructured::new(&buf);
14007        Self::arbitrary(&mut unstructured).unwrap_or_default()
14008    }
14009}
14010impl Default for GPS_RAW_INT_DATA {
14011    fn default() -> Self {
14012        Self::DEFAULT.clone()
14013    }
14014}
14015impl MessageData for GPS_RAW_INT_DATA {
14016    type Message = MavMessage;
14017    const ID: u32 = 24u32;
14018    const NAME: &'static str = "GPS_RAW_INT";
14019    const EXTRA_CRC: u8 = 24u8;
14020    const ENCODED_LEN: usize = 52usize;
14021    fn deser(
14022        _version: MavlinkVersion,
14023        __input: &[u8],
14024    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14025        let avail_len = __input.len();
14026        let mut payload_buf = [0; Self::ENCODED_LEN];
14027        let mut buf = if avail_len < Self::ENCODED_LEN {
14028            payload_buf[0..avail_len].copy_from_slice(__input);
14029            Bytes::new(&payload_buf)
14030        } else {
14031            Bytes::new(__input)
14032        };
14033        let mut __struct = Self::default();
14034        __struct.time_usec = buf.get_u64_le();
14035        __struct.lat = buf.get_i32_le();
14036        __struct.lon = buf.get_i32_le();
14037        __struct.alt = buf.get_i32_le();
14038        __struct.eph = buf.get_u16_le();
14039        __struct.epv = buf.get_u16_le();
14040        __struct.vel = buf.get_u16_le();
14041        __struct.cog = buf.get_u16_le();
14042        let tmp = buf.get_u8();
14043        __struct.fix_type =
14044            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14045                enum_type: "GpsFixType",
14046                value: tmp as u32,
14047            })?;
14048        __struct.satellites_visible = buf.get_u8();
14049        __struct.alt_ellipsoid = buf.get_i32_le();
14050        __struct.h_acc = buf.get_u32_le();
14051        __struct.v_acc = buf.get_u32_le();
14052        __struct.vel_acc = buf.get_u32_le();
14053        __struct.hdg_acc = buf.get_u32_le();
14054        __struct.yaw = buf.get_u16_le();
14055        Ok(__struct)
14056    }
14057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14058        let mut __tmp = BytesMut::new(bytes);
14059        #[allow(clippy::absurd_extreme_comparisons)]
14060        #[allow(unused_comparisons)]
14061        if __tmp.remaining() < Self::ENCODED_LEN {
14062            panic!(
14063                "buffer is too small (need {} bytes, but got {})",
14064                Self::ENCODED_LEN,
14065                __tmp.remaining(),
14066            )
14067        }
14068        __tmp.put_u64_le(self.time_usec);
14069        __tmp.put_i32_le(self.lat);
14070        __tmp.put_i32_le(self.lon);
14071        __tmp.put_i32_le(self.alt);
14072        __tmp.put_u16_le(self.eph);
14073        __tmp.put_u16_le(self.epv);
14074        __tmp.put_u16_le(self.vel);
14075        __tmp.put_u16_le(self.cog);
14076        __tmp.put_u8(self.fix_type as u8);
14077        __tmp.put_u8(self.satellites_visible);
14078        __tmp.put_i32_le(self.alt_ellipsoid);
14079        __tmp.put_u32_le(self.h_acc);
14080        __tmp.put_u32_le(self.v_acc);
14081        __tmp.put_u32_le(self.vel_acc);
14082        __tmp.put_u32_le(self.hdg_acc);
14083        __tmp.put_u16_le(self.yaw);
14084        if matches!(version, MavlinkVersion::V2) {
14085            let len = __tmp.len();
14086            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14087        } else {
14088            __tmp.len()
14089        }
14090    }
14091}
14092#[doc = "id: 233"]
14093#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
14094#[derive(Debug, Clone, PartialEq)]
14095#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14096#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14097pub struct GPS_RTCM_DATA_DATA {
14098    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
14099    pub flags: u8,
14100    #[doc = "data length"]
14101    pub len: u8,
14102    #[doc = "RTCM message (may be fragmented)"]
14103    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14104    pub data: [u8; 180],
14105}
14106impl GPS_RTCM_DATA_DATA {
14107    pub const ENCODED_LEN: usize = 182usize;
14108    pub const DEFAULT: Self = Self {
14109        flags: 0_u8,
14110        len: 0_u8,
14111        data: [0_u8; 180usize],
14112    };
14113    #[cfg(feature = "arbitrary")]
14114    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14115        use arbitrary::{Arbitrary, Unstructured};
14116        let mut buf = [0u8; 1024];
14117        rng.fill_bytes(&mut buf);
14118        let mut unstructured = Unstructured::new(&buf);
14119        Self::arbitrary(&mut unstructured).unwrap_or_default()
14120    }
14121}
14122impl Default for GPS_RTCM_DATA_DATA {
14123    fn default() -> Self {
14124        Self::DEFAULT.clone()
14125    }
14126}
14127impl MessageData for GPS_RTCM_DATA_DATA {
14128    type Message = MavMessage;
14129    const ID: u32 = 233u32;
14130    const NAME: &'static str = "GPS_RTCM_DATA";
14131    const EXTRA_CRC: u8 = 35u8;
14132    const ENCODED_LEN: usize = 182usize;
14133    fn deser(
14134        _version: MavlinkVersion,
14135        __input: &[u8],
14136    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14137        let avail_len = __input.len();
14138        let mut payload_buf = [0; Self::ENCODED_LEN];
14139        let mut buf = if avail_len < Self::ENCODED_LEN {
14140            payload_buf[0..avail_len].copy_from_slice(__input);
14141            Bytes::new(&payload_buf)
14142        } else {
14143            Bytes::new(__input)
14144        };
14145        let mut __struct = Self::default();
14146        __struct.flags = buf.get_u8();
14147        __struct.len = buf.get_u8();
14148        for v in &mut __struct.data {
14149            let val = buf.get_u8();
14150            *v = val;
14151        }
14152        Ok(__struct)
14153    }
14154    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14155        let mut __tmp = BytesMut::new(bytes);
14156        #[allow(clippy::absurd_extreme_comparisons)]
14157        #[allow(unused_comparisons)]
14158        if __tmp.remaining() < Self::ENCODED_LEN {
14159            panic!(
14160                "buffer is too small (need {} bytes, but got {})",
14161                Self::ENCODED_LEN,
14162                __tmp.remaining(),
14163            )
14164        }
14165        __tmp.put_u8(self.flags);
14166        __tmp.put_u8(self.len);
14167        for val in &self.data {
14168            __tmp.put_u8(*val);
14169        }
14170        if matches!(version, MavlinkVersion::V2) {
14171            let len = __tmp.len();
14172            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14173        } else {
14174            __tmp.len()
14175        }
14176    }
14177}
14178#[doc = "id: 127"]
14179#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14180#[derive(Debug, Clone, PartialEq)]
14181#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14182#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14183pub struct GPS_RTK_DATA {
14184    #[doc = "Time since boot of last baseline message received."]
14185    pub time_last_baseline_ms: u32,
14186    #[doc = "GPS Time of Week of last baseline"]
14187    pub tow: u32,
14188    #[doc = "Current baseline in ECEF x or NED north component."]
14189    pub baseline_a_mm: i32,
14190    #[doc = "Current baseline in ECEF y or NED east component."]
14191    pub baseline_b_mm: i32,
14192    #[doc = "Current baseline in ECEF z or NED down component."]
14193    pub baseline_c_mm: i32,
14194    #[doc = "Current estimate of baseline accuracy."]
14195    pub accuracy: u32,
14196    #[doc = "Current number of integer ambiguity hypotheses."]
14197    pub iar_num_hypotheses: i32,
14198    #[doc = "GPS Week Number of last baseline"]
14199    pub wn: u16,
14200    #[doc = "Identification of connected RTK receiver."]
14201    pub rtk_receiver_id: u8,
14202    #[doc = "GPS-specific health report for RTK data."]
14203    pub rtk_health: u8,
14204    #[doc = "Rate of baseline messages being received by GPS"]
14205    pub rtk_rate: u8,
14206    #[doc = "Current number of sats used for RTK calculation."]
14207    pub nsats: u8,
14208    #[doc = "Coordinate system of baseline"]
14209    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14210}
14211impl GPS_RTK_DATA {
14212    pub const ENCODED_LEN: usize = 35usize;
14213    pub const DEFAULT: Self = Self {
14214        time_last_baseline_ms: 0_u32,
14215        tow: 0_u32,
14216        baseline_a_mm: 0_i32,
14217        baseline_b_mm: 0_i32,
14218        baseline_c_mm: 0_i32,
14219        accuracy: 0_u32,
14220        iar_num_hypotheses: 0_i32,
14221        wn: 0_u16,
14222        rtk_receiver_id: 0_u8,
14223        rtk_health: 0_u8,
14224        rtk_rate: 0_u8,
14225        nsats: 0_u8,
14226        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14227    };
14228    #[cfg(feature = "arbitrary")]
14229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14230        use arbitrary::{Arbitrary, Unstructured};
14231        let mut buf = [0u8; 1024];
14232        rng.fill_bytes(&mut buf);
14233        let mut unstructured = Unstructured::new(&buf);
14234        Self::arbitrary(&mut unstructured).unwrap_or_default()
14235    }
14236}
14237impl Default for GPS_RTK_DATA {
14238    fn default() -> Self {
14239        Self::DEFAULT.clone()
14240    }
14241}
14242impl MessageData for GPS_RTK_DATA {
14243    type Message = MavMessage;
14244    const ID: u32 = 127u32;
14245    const NAME: &'static str = "GPS_RTK";
14246    const EXTRA_CRC: u8 = 25u8;
14247    const ENCODED_LEN: usize = 35usize;
14248    fn deser(
14249        _version: MavlinkVersion,
14250        __input: &[u8],
14251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14252        let avail_len = __input.len();
14253        let mut payload_buf = [0; Self::ENCODED_LEN];
14254        let mut buf = if avail_len < Self::ENCODED_LEN {
14255            payload_buf[0..avail_len].copy_from_slice(__input);
14256            Bytes::new(&payload_buf)
14257        } else {
14258            Bytes::new(__input)
14259        };
14260        let mut __struct = Self::default();
14261        __struct.time_last_baseline_ms = buf.get_u32_le();
14262        __struct.tow = buf.get_u32_le();
14263        __struct.baseline_a_mm = buf.get_i32_le();
14264        __struct.baseline_b_mm = buf.get_i32_le();
14265        __struct.baseline_c_mm = buf.get_i32_le();
14266        __struct.accuracy = buf.get_u32_le();
14267        __struct.iar_num_hypotheses = buf.get_i32_le();
14268        __struct.wn = buf.get_u16_le();
14269        __struct.rtk_receiver_id = buf.get_u8();
14270        __struct.rtk_health = buf.get_u8();
14271        __struct.rtk_rate = buf.get_u8();
14272        __struct.nsats = buf.get_u8();
14273        let tmp = buf.get_u8();
14274        __struct.baseline_coords_type =
14275            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14276                enum_type: "RtkBaselineCoordinateSystem",
14277                value: tmp as u32,
14278            })?;
14279        Ok(__struct)
14280    }
14281    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14282        let mut __tmp = BytesMut::new(bytes);
14283        #[allow(clippy::absurd_extreme_comparisons)]
14284        #[allow(unused_comparisons)]
14285        if __tmp.remaining() < Self::ENCODED_LEN {
14286            panic!(
14287                "buffer is too small (need {} bytes, but got {})",
14288                Self::ENCODED_LEN,
14289                __tmp.remaining(),
14290            )
14291        }
14292        __tmp.put_u32_le(self.time_last_baseline_ms);
14293        __tmp.put_u32_le(self.tow);
14294        __tmp.put_i32_le(self.baseline_a_mm);
14295        __tmp.put_i32_le(self.baseline_b_mm);
14296        __tmp.put_i32_le(self.baseline_c_mm);
14297        __tmp.put_u32_le(self.accuracy);
14298        __tmp.put_i32_le(self.iar_num_hypotheses);
14299        __tmp.put_u16_le(self.wn);
14300        __tmp.put_u8(self.rtk_receiver_id);
14301        __tmp.put_u8(self.rtk_health);
14302        __tmp.put_u8(self.rtk_rate);
14303        __tmp.put_u8(self.nsats);
14304        __tmp.put_u8(self.baseline_coords_type as u8);
14305        if matches!(version, MavlinkVersion::V2) {
14306            let len = __tmp.len();
14307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14308        } else {
14309            __tmp.len()
14310        }
14311    }
14312}
14313#[doc = "id: 25"]
14314#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14315#[derive(Debug, Clone, PartialEq)]
14316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14318pub struct GPS_STATUS_DATA {
14319    #[doc = "Number of satellites visible"]
14320    pub satellites_visible: u8,
14321    #[doc = "Global satellite ID"]
14322    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14323    pub satellite_prn: [u8; 20],
14324    #[doc = "0: Satellite not used, 1: used for localization"]
14325    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14326    pub satellite_used: [u8; 20],
14327    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14328    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14329    pub satellite_elevation: [u8; 20],
14330    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14331    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14332    pub satellite_azimuth: [u8; 20],
14333    #[doc = "Signal to noise ratio of satellite"]
14334    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14335    pub satellite_snr: [u8; 20],
14336}
14337impl GPS_STATUS_DATA {
14338    pub const ENCODED_LEN: usize = 101usize;
14339    pub const DEFAULT: Self = Self {
14340        satellites_visible: 0_u8,
14341        satellite_prn: [0_u8; 20usize],
14342        satellite_used: [0_u8; 20usize],
14343        satellite_elevation: [0_u8; 20usize],
14344        satellite_azimuth: [0_u8; 20usize],
14345        satellite_snr: [0_u8; 20usize],
14346    };
14347    #[cfg(feature = "arbitrary")]
14348    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14349        use arbitrary::{Arbitrary, Unstructured};
14350        let mut buf = [0u8; 1024];
14351        rng.fill_bytes(&mut buf);
14352        let mut unstructured = Unstructured::new(&buf);
14353        Self::arbitrary(&mut unstructured).unwrap_or_default()
14354    }
14355}
14356impl Default for GPS_STATUS_DATA {
14357    fn default() -> Self {
14358        Self::DEFAULT.clone()
14359    }
14360}
14361impl MessageData for GPS_STATUS_DATA {
14362    type Message = MavMessage;
14363    const ID: u32 = 25u32;
14364    const NAME: &'static str = "GPS_STATUS";
14365    const EXTRA_CRC: u8 = 23u8;
14366    const ENCODED_LEN: usize = 101usize;
14367    fn deser(
14368        _version: MavlinkVersion,
14369        __input: &[u8],
14370    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14371        let avail_len = __input.len();
14372        let mut payload_buf = [0; Self::ENCODED_LEN];
14373        let mut buf = if avail_len < Self::ENCODED_LEN {
14374            payload_buf[0..avail_len].copy_from_slice(__input);
14375            Bytes::new(&payload_buf)
14376        } else {
14377            Bytes::new(__input)
14378        };
14379        let mut __struct = Self::default();
14380        __struct.satellites_visible = buf.get_u8();
14381        for v in &mut __struct.satellite_prn {
14382            let val = buf.get_u8();
14383            *v = val;
14384        }
14385        for v in &mut __struct.satellite_used {
14386            let val = buf.get_u8();
14387            *v = val;
14388        }
14389        for v in &mut __struct.satellite_elevation {
14390            let val = buf.get_u8();
14391            *v = val;
14392        }
14393        for v in &mut __struct.satellite_azimuth {
14394            let val = buf.get_u8();
14395            *v = val;
14396        }
14397        for v in &mut __struct.satellite_snr {
14398            let val = buf.get_u8();
14399            *v = val;
14400        }
14401        Ok(__struct)
14402    }
14403    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14404        let mut __tmp = BytesMut::new(bytes);
14405        #[allow(clippy::absurd_extreme_comparisons)]
14406        #[allow(unused_comparisons)]
14407        if __tmp.remaining() < Self::ENCODED_LEN {
14408            panic!(
14409                "buffer is too small (need {} bytes, but got {})",
14410                Self::ENCODED_LEN,
14411                __tmp.remaining(),
14412            )
14413        }
14414        __tmp.put_u8(self.satellites_visible);
14415        for val in &self.satellite_prn {
14416            __tmp.put_u8(*val);
14417        }
14418        for val in &self.satellite_used {
14419            __tmp.put_u8(*val);
14420        }
14421        for val in &self.satellite_elevation {
14422            __tmp.put_u8(*val);
14423        }
14424        for val in &self.satellite_azimuth {
14425            __tmp.put_u8(*val);
14426        }
14427        for val in &self.satellite_snr {
14428            __tmp.put_u8(*val);
14429        }
14430        if matches!(version, MavlinkVersion::V2) {
14431            let len = __tmp.len();
14432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14433        } else {
14434            __tmp.len()
14435        }
14436    }
14437}
14438#[doc = "id: 0"]
14439#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14440#[derive(Debug, Clone, PartialEq)]
14441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14443pub struct HEARTBEAT_DATA {
14444    #[doc = "A bitfield for use for autopilot-specific flags"]
14445    pub custom_mode: u32,
14446    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14447    pub mavtype: MavType,
14448    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14449    pub autopilot: MavAutopilot,
14450    #[doc = "System mode bitmap."]
14451    pub base_mode: MavModeFlag,
14452    #[doc = "System status flag."]
14453    pub system_status: MavState,
14454    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14455    pub mavlink_version: u8,
14456}
14457impl HEARTBEAT_DATA {
14458    pub const ENCODED_LEN: usize = 9usize;
14459    pub const DEFAULT: Self = Self {
14460        custom_mode: 0_u32,
14461        mavtype: MavType::DEFAULT,
14462        autopilot: MavAutopilot::DEFAULT,
14463        base_mode: MavModeFlag::DEFAULT,
14464        system_status: MavState::DEFAULT,
14465        mavlink_version: 0_u8,
14466    };
14467    #[cfg(feature = "arbitrary")]
14468    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14469        use arbitrary::{Arbitrary, Unstructured};
14470        let mut buf = [0u8; 1024];
14471        rng.fill_bytes(&mut buf);
14472        let mut unstructured = Unstructured::new(&buf);
14473        Self::arbitrary(&mut unstructured).unwrap_or_default()
14474    }
14475}
14476impl Default for HEARTBEAT_DATA {
14477    fn default() -> Self {
14478        Self::DEFAULT.clone()
14479    }
14480}
14481impl MessageData for HEARTBEAT_DATA {
14482    type Message = MavMessage;
14483    const ID: u32 = 0u32;
14484    const NAME: &'static str = "HEARTBEAT";
14485    const EXTRA_CRC: u8 = 50u8;
14486    const ENCODED_LEN: usize = 9usize;
14487    fn deser(
14488        _version: MavlinkVersion,
14489        __input: &[u8],
14490    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14491        let avail_len = __input.len();
14492        let mut payload_buf = [0; Self::ENCODED_LEN];
14493        let mut buf = if avail_len < Self::ENCODED_LEN {
14494            payload_buf[0..avail_len].copy_from_slice(__input);
14495            Bytes::new(&payload_buf)
14496        } else {
14497            Bytes::new(__input)
14498        };
14499        let mut __struct = Self::default();
14500        __struct.custom_mode = buf.get_u32_le();
14501        let tmp = buf.get_u8();
14502        __struct.mavtype =
14503            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14504                enum_type: "MavType",
14505                value: tmp as u32,
14506            })?;
14507        let tmp = buf.get_u8();
14508        __struct.autopilot =
14509            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14510                enum_type: "MavAutopilot",
14511                value: tmp as u32,
14512            })?;
14513        let tmp = buf.get_u8();
14514        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14515            ::mavlink_core::error::ParserError::InvalidFlag {
14516                flag_type: "MavModeFlag",
14517                value: tmp as u32,
14518            },
14519        )?;
14520        let tmp = buf.get_u8();
14521        __struct.system_status =
14522            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14523                enum_type: "MavState",
14524                value: tmp as u32,
14525            })?;
14526        __struct.mavlink_version = buf.get_u8();
14527        Ok(__struct)
14528    }
14529    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14530        let mut __tmp = BytesMut::new(bytes);
14531        #[allow(clippy::absurd_extreme_comparisons)]
14532        #[allow(unused_comparisons)]
14533        if __tmp.remaining() < Self::ENCODED_LEN {
14534            panic!(
14535                "buffer is too small (need {} bytes, but got {})",
14536                Self::ENCODED_LEN,
14537                __tmp.remaining(),
14538            )
14539        }
14540        __tmp.put_u32_le(self.custom_mode);
14541        __tmp.put_u8(self.mavtype as u8);
14542        __tmp.put_u8(self.autopilot as u8);
14543        __tmp.put_u8(self.base_mode.bits());
14544        __tmp.put_u8(self.system_status as u8);
14545        __tmp.put_u8(self.mavlink_version);
14546        if matches!(version, MavlinkVersion::V2) {
14547            let len = __tmp.len();
14548            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14549        } else {
14550            __tmp.len()
14551        }
14552    }
14553}
14554#[doc = "id: 50003"]
14555#[doc = "Herelink Telemetry."]
14556#[derive(Debug, Clone, PartialEq)]
14557#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14558#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14559pub struct HERELINK_TELEM_DATA {}
14560impl HERELINK_TELEM_DATA {
14561    pub const ENCODED_LEN: usize = 0usize;
14562    pub const DEFAULT: Self = Self {};
14563    #[cfg(feature = "arbitrary")]
14564    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14565        use arbitrary::{Arbitrary, Unstructured};
14566        let mut buf = [0u8; 1024];
14567        rng.fill_bytes(&mut buf);
14568        let mut unstructured = Unstructured::new(&buf);
14569        Self::arbitrary(&mut unstructured).unwrap_or_default()
14570    }
14571}
14572impl Default for HERELINK_TELEM_DATA {
14573    fn default() -> Self {
14574        Self::DEFAULT.clone()
14575    }
14576}
14577impl MessageData for HERELINK_TELEM_DATA {
14578    type Message = MavMessage;
14579    const ID: u32 = 50003u32;
14580    const NAME: &'static str = "HERELINK_TELEM";
14581    const EXTRA_CRC: u8 = 53u8;
14582    const ENCODED_LEN: usize = 0usize;
14583    fn deser(
14584        _version: MavlinkVersion,
14585        __input: &[u8],
14586    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14587        Ok(Self::default())
14588    }
14589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14590        let mut __tmp = BytesMut::new(bytes);
14591        #[allow(clippy::absurd_extreme_comparisons)]
14592        #[allow(unused_comparisons)]
14593        if __tmp.remaining() < Self::ENCODED_LEN {
14594            panic!(
14595                "buffer is too small (need {} bytes, but got {})",
14596                Self::ENCODED_LEN,
14597                __tmp.remaining(),
14598            )
14599        }
14600        if matches!(version, MavlinkVersion::V2) {
14601            let len = __tmp.len();
14602            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14603        } else {
14604            __tmp.len()
14605        }
14606    }
14607}
14608#[doc = "id: 50002"]
14609#[doc = "Information about video stream."]
14610#[derive(Debug, Clone, PartialEq)]
14611#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14612#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14613pub struct HERELINK_VIDEO_STREAM_INFORMATION_DATA {
14614    #[doc = "Frame rate."]
14615    pub framerate: f32,
14616    #[doc = "Bit rate."]
14617    pub bitrate: u32,
14618    #[doc = "Horizontal resolution."]
14619    pub resolution_h: u16,
14620    #[doc = "Vertical resolution."]
14621    pub resolution_v: u16,
14622    #[doc = "Video image rotation clockwise."]
14623    pub rotation: u16,
14624    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
14625    pub camera_id: u8,
14626    #[doc = "Number of streams available."]
14627    pub status: u8,
14628    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
14629    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14630    pub uri: [u8; 230],
14631}
14632impl HERELINK_VIDEO_STREAM_INFORMATION_DATA {
14633    pub const ENCODED_LEN: usize = 246usize;
14634    pub const DEFAULT: Self = Self {
14635        framerate: 0.0_f32,
14636        bitrate: 0_u32,
14637        resolution_h: 0_u16,
14638        resolution_v: 0_u16,
14639        rotation: 0_u16,
14640        camera_id: 0_u8,
14641        status: 0_u8,
14642        uri: [0_u8; 230usize],
14643    };
14644    #[cfg(feature = "arbitrary")]
14645    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14646        use arbitrary::{Arbitrary, Unstructured};
14647        let mut buf = [0u8; 1024];
14648        rng.fill_bytes(&mut buf);
14649        let mut unstructured = Unstructured::new(&buf);
14650        Self::arbitrary(&mut unstructured).unwrap_or_default()
14651    }
14652}
14653impl Default for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
14654    fn default() -> Self {
14655        Self::DEFAULT.clone()
14656    }
14657}
14658impl MessageData for HERELINK_VIDEO_STREAM_INFORMATION_DATA {
14659    type Message = MavMessage;
14660    const ID: u32 = 50002u32;
14661    const NAME: &'static str = "HERELINK_VIDEO_STREAM_INFORMATION";
14662    const EXTRA_CRC: u8 = 181u8;
14663    const ENCODED_LEN: usize = 246usize;
14664    fn deser(
14665        _version: MavlinkVersion,
14666        __input: &[u8],
14667    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14668        let avail_len = __input.len();
14669        let mut payload_buf = [0; Self::ENCODED_LEN];
14670        let mut buf = if avail_len < Self::ENCODED_LEN {
14671            payload_buf[0..avail_len].copy_from_slice(__input);
14672            Bytes::new(&payload_buf)
14673        } else {
14674            Bytes::new(__input)
14675        };
14676        let mut __struct = Self::default();
14677        __struct.framerate = buf.get_f32_le();
14678        __struct.bitrate = buf.get_u32_le();
14679        __struct.resolution_h = buf.get_u16_le();
14680        __struct.resolution_v = buf.get_u16_le();
14681        __struct.rotation = buf.get_u16_le();
14682        __struct.camera_id = buf.get_u8();
14683        __struct.status = buf.get_u8();
14684        for v in &mut __struct.uri {
14685            let val = buf.get_u8();
14686            *v = val;
14687        }
14688        Ok(__struct)
14689    }
14690    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14691        let mut __tmp = BytesMut::new(bytes);
14692        #[allow(clippy::absurd_extreme_comparisons)]
14693        #[allow(unused_comparisons)]
14694        if __tmp.remaining() < Self::ENCODED_LEN {
14695            panic!(
14696                "buffer is too small (need {} bytes, but got {})",
14697                Self::ENCODED_LEN,
14698                __tmp.remaining(),
14699            )
14700        }
14701        __tmp.put_f32_le(self.framerate);
14702        __tmp.put_u32_le(self.bitrate);
14703        __tmp.put_u16_le(self.resolution_h);
14704        __tmp.put_u16_le(self.resolution_v);
14705        __tmp.put_u16_le(self.rotation);
14706        __tmp.put_u8(self.camera_id);
14707        __tmp.put_u8(self.status);
14708        for val in &self.uri {
14709            __tmp.put_u8(*val);
14710        }
14711        if matches!(version, MavlinkVersion::V2) {
14712            let len = __tmp.len();
14713            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14714        } else {
14715            __tmp.len()
14716        }
14717    }
14718}
14719#[doc = "id: 105"]
14720#[doc = "The IMU readings in SI units in NED body frame."]
14721#[derive(Debug, Clone, PartialEq)]
14722#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14723#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14724pub struct HIGHRES_IMU_DATA {
14725    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14726    pub time_usec: u64,
14727    #[doc = "X acceleration"]
14728    pub xacc: f32,
14729    #[doc = "Y acceleration"]
14730    pub yacc: f32,
14731    #[doc = "Z acceleration"]
14732    pub zacc: f32,
14733    #[doc = "Angular speed around X axis"]
14734    pub xgyro: f32,
14735    #[doc = "Angular speed around Y axis"]
14736    pub ygyro: f32,
14737    #[doc = "Angular speed around Z axis"]
14738    pub zgyro: f32,
14739    #[doc = "X Magnetic field"]
14740    pub xmag: f32,
14741    #[doc = "Y Magnetic field"]
14742    pub ymag: f32,
14743    #[doc = "Z Magnetic field"]
14744    pub zmag: f32,
14745    #[doc = "Absolute pressure"]
14746    pub abs_pressure: f32,
14747    #[doc = "Differential pressure"]
14748    pub diff_pressure: f32,
14749    #[doc = "Altitude calculated from pressure"]
14750    pub pressure_alt: f32,
14751    #[doc = "Temperature"]
14752    pub temperature: f32,
14753    #[doc = "Bitmap for fields that have updated since last message"]
14754    pub fields_updated: HighresImuUpdatedFlags,
14755    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14756    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14757    pub id: u8,
14758}
14759impl HIGHRES_IMU_DATA {
14760    pub const ENCODED_LEN: usize = 63usize;
14761    pub const DEFAULT: Self = Self {
14762        time_usec: 0_u64,
14763        xacc: 0.0_f32,
14764        yacc: 0.0_f32,
14765        zacc: 0.0_f32,
14766        xgyro: 0.0_f32,
14767        ygyro: 0.0_f32,
14768        zgyro: 0.0_f32,
14769        xmag: 0.0_f32,
14770        ymag: 0.0_f32,
14771        zmag: 0.0_f32,
14772        abs_pressure: 0.0_f32,
14773        diff_pressure: 0.0_f32,
14774        pressure_alt: 0.0_f32,
14775        temperature: 0.0_f32,
14776        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14777        id: 0_u8,
14778    };
14779    #[cfg(feature = "arbitrary")]
14780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14781        use arbitrary::{Arbitrary, Unstructured};
14782        let mut buf = [0u8; 1024];
14783        rng.fill_bytes(&mut buf);
14784        let mut unstructured = Unstructured::new(&buf);
14785        Self::arbitrary(&mut unstructured).unwrap_or_default()
14786    }
14787}
14788impl Default for HIGHRES_IMU_DATA {
14789    fn default() -> Self {
14790        Self::DEFAULT.clone()
14791    }
14792}
14793impl MessageData for HIGHRES_IMU_DATA {
14794    type Message = MavMessage;
14795    const ID: u32 = 105u32;
14796    const NAME: &'static str = "HIGHRES_IMU";
14797    const EXTRA_CRC: u8 = 93u8;
14798    const ENCODED_LEN: usize = 63usize;
14799    fn deser(
14800        _version: MavlinkVersion,
14801        __input: &[u8],
14802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14803        let avail_len = __input.len();
14804        let mut payload_buf = [0; Self::ENCODED_LEN];
14805        let mut buf = if avail_len < Self::ENCODED_LEN {
14806            payload_buf[0..avail_len].copy_from_slice(__input);
14807            Bytes::new(&payload_buf)
14808        } else {
14809            Bytes::new(__input)
14810        };
14811        let mut __struct = Self::default();
14812        __struct.time_usec = buf.get_u64_le();
14813        __struct.xacc = buf.get_f32_le();
14814        __struct.yacc = buf.get_f32_le();
14815        __struct.zacc = buf.get_f32_le();
14816        __struct.xgyro = buf.get_f32_le();
14817        __struct.ygyro = buf.get_f32_le();
14818        __struct.zgyro = buf.get_f32_le();
14819        __struct.xmag = buf.get_f32_le();
14820        __struct.ymag = buf.get_f32_le();
14821        __struct.zmag = buf.get_f32_le();
14822        __struct.abs_pressure = buf.get_f32_le();
14823        __struct.diff_pressure = buf.get_f32_le();
14824        __struct.pressure_alt = buf.get_f32_le();
14825        __struct.temperature = buf.get_f32_le();
14826        let tmp = buf.get_u16_le();
14827        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
14828            tmp & HighresImuUpdatedFlags::all().bits(),
14829        )
14830        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14831            flag_type: "HighresImuUpdatedFlags",
14832            value: tmp as u32,
14833        })?;
14834        __struct.id = buf.get_u8();
14835        Ok(__struct)
14836    }
14837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14838        let mut __tmp = BytesMut::new(bytes);
14839        #[allow(clippy::absurd_extreme_comparisons)]
14840        #[allow(unused_comparisons)]
14841        if __tmp.remaining() < Self::ENCODED_LEN {
14842            panic!(
14843                "buffer is too small (need {} bytes, but got {})",
14844                Self::ENCODED_LEN,
14845                __tmp.remaining(),
14846            )
14847        }
14848        __tmp.put_u64_le(self.time_usec);
14849        __tmp.put_f32_le(self.xacc);
14850        __tmp.put_f32_le(self.yacc);
14851        __tmp.put_f32_le(self.zacc);
14852        __tmp.put_f32_le(self.xgyro);
14853        __tmp.put_f32_le(self.ygyro);
14854        __tmp.put_f32_le(self.zgyro);
14855        __tmp.put_f32_le(self.xmag);
14856        __tmp.put_f32_le(self.ymag);
14857        __tmp.put_f32_le(self.zmag);
14858        __tmp.put_f32_le(self.abs_pressure);
14859        __tmp.put_f32_le(self.diff_pressure);
14860        __tmp.put_f32_le(self.pressure_alt);
14861        __tmp.put_f32_le(self.temperature);
14862        __tmp.put_u16_le(self.fields_updated.bits());
14863        __tmp.put_u8(self.id);
14864        if matches!(version, MavlinkVersion::V2) {
14865            let len = __tmp.len();
14866            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14867        } else {
14868            __tmp.len()
14869        }
14870    }
14871}
14872#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
14873#[doc = "id: 234"]
14874#[doc = "Message appropriate for high latency connections like Iridium."]
14875#[derive(Debug, Clone, PartialEq)]
14876#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14877#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14878pub struct HIGH_LATENCY_DATA {
14879    #[doc = "A bitfield for use for autopilot-specific flags."]
14880    pub custom_mode: u32,
14881    #[doc = "Latitude"]
14882    pub latitude: i32,
14883    #[doc = "Longitude"]
14884    pub longitude: i32,
14885    #[doc = "roll"]
14886    pub roll: i16,
14887    #[doc = "pitch"]
14888    pub pitch: i16,
14889    #[doc = "heading"]
14890    pub heading: u16,
14891    #[doc = "heading setpoint"]
14892    pub heading_sp: i16,
14893    #[doc = "Altitude above mean sea level"]
14894    pub altitude_amsl: i16,
14895    #[doc = "Altitude setpoint relative to the home position"]
14896    pub altitude_sp: i16,
14897    #[doc = "distance to target"]
14898    pub wp_distance: u16,
14899    #[doc = "Bitmap of enabled system modes."]
14900    pub base_mode: MavModeFlag,
14901    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
14902    pub landed_state: MavLandedState,
14903    #[doc = "throttle (percentage)"]
14904    pub throttle: i8,
14905    #[doc = "airspeed"]
14906    pub airspeed: u8,
14907    #[doc = "airspeed setpoint"]
14908    pub airspeed_sp: u8,
14909    #[doc = "groundspeed"]
14910    pub groundspeed: u8,
14911    #[doc = "climb rate"]
14912    pub climb_rate: i8,
14913    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14914    pub gps_nsat: u8,
14915    #[doc = "GPS Fix type."]
14916    pub gps_fix_type: GpsFixType,
14917    #[doc = "Remaining battery (percentage)"]
14918    pub battery_remaining: u8,
14919    #[doc = "Autopilot temperature (degrees C)"]
14920    pub temperature: i8,
14921    #[doc = "Air temperature (degrees C) from airspeed sensor"]
14922    pub temperature_air: i8,
14923    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
14924    pub failsafe: u8,
14925    #[doc = "current waypoint number"]
14926    pub wp_num: u8,
14927}
14928impl HIGH_LATENCY_DATA {
14929    pub const ENCODED_LEN: usize = 40usize;
14930    pub const DEFAULT: Self = Self {
14931        custom_mode: 0_u32,
14932        latitude: 0_i32,
14933        longitude: 0_i32,
14934        roll: 0_i16,
14935        pitch: 0_i16,
14936        heading: 0_u16,
14937        heading_sp: 0_i16,
14938        altitude_amsl: 0_i16,
14939        altitude_sp: 0_i16,
14940        wp_distance: 0_u16,
14941        base_mode: MavModeFlag::DEFAULT,
14942        landed_state: MavLandedState::DEFAULT,
14943        throttle: 0_i8,
14944        airspeed: 0_u8,
14945        airspeed_sp: 0_u8,
14946        groundspeed: 0_u8,
14947        climb_rate: 0_i8,
14948        gps_nsat: 0_u8,
14949        gps_fix_type: GpsFixType::DEFAULT,
14950        battery_remaining: 0_u8,
14951        temperature: 0_i8,
14952        temperature_air: 0_i8,
14953        failsafe: 0_u8,
14954        wp_num: 0_u8,
14955    };
14956    #[cfg(feature = "arbitrary")]
14957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14958        use arbitrary::{Arbitrary, Unstructured};
14959        let mut buf = [0u8; 1024];
14960        rng.fill_bytes(&mut buf);
14961        let mut unstructured = Unstructured::new(&buf);
14962        Self::arbitrary(&mut unstructured).unwrap_or_default()
14963    }
14964}
14965impl Default for HIGH_LATENCY_DATA {
14966    fn default() -> Self {
14967        Self::DEFAULT.clone()
14968    }
14969}
14970impl MessageData for HIGH_LATENCY_DATA {
14971    type Message = MavMessage;
14972    const ID: u32 = 234u32;
14973    const NAME: &'static str = "HIGH_LATENCY";
14974    const EXTRA_CRC: u8 = 150u8;
14975    const ENCODED_LEN: usize = 40usize;
14976    fn deser(
14977        _version: MavlinkVersion,
14978        __input: &[u8],
14979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14980        let avail_len = __input.len();
14981        let mut payload_buf = [0; Self::ENCODED_LEN];
14982        let mut buf = if avail_len < Self::ENCODED_LEN {
14983            payload_buf[0..avail_len].copy_from_slice(__input);
14984            Bytes::new(&payload_buf)
14985        } else {
14986            Bytes::new(__input)
14987        };
14988        let mut __struct = Self::default();
14989        __struct.custom_mode = buf.get_u32_le();
14990        __struct.latitude = buf.get_i32_le();
14991        __struct.longitude = buf.get_i32_le();
14992        __struct.roll = buf.get_i16_le();
14993        __struct.pitch = buf.get_i16_le();
14994        __struct.heading = buf.get_u16_le();
14995        __struct.heading_sp = buf.get_i16_le();
14996        __struct.altitude_amsl = buf.get_i16_le();
14997        __struct.altitude_sp = buf.get_i16_le();
14998        __struct.wp_distance = buf.get_u16_le();
14999        let tmp = buf.get_u8();
15000        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15001            ::mavlink_core::error::ParserError::InvalidFlag {
15002                flag_type: "MavModeFlag",
15003                value: tmp as u32,
15004            },
15005        )?;
15006        let tmp = buf.get_u8();
15007        __struct.landed_state =
15008            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15009                enum_type: "MavLandedState",
15010                value: tmp as u32,
15011            })?;
15012        __struct.throttle = buf.get_i8();
15013        __struct.airspeed = buf.get_u8();
15014        __struct.airspeed_sp = buf.get_u8();
15015        __struct.groundspeed = buf.get_u8();
15016        __struct.climb_rate = buf.get_i8();
15017        __struct.gps_nsat = buf.get_u8();
15018        let tmp = buf.get_u8();
15019        __struct.gps_fix_type =
15020            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15021                enum_type: "GpsFixType",
15022                value: tmp as u32,
15023            })?;
15024        __struct.battery_remaining = buf.get_u8();
15025        __struct.temperature = buf.get_i8();
15026        __struct.temperature_air = buf.get_i8();
15027        __struct.failsafe = buf.get_u8();
15028        __struct.wp_num = buf.get_u8();
15029        Ok(__struct)
15030    }
15031    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15032        let mut __tmp = BytesMut::new(bytes);
15033        #[allow(clippy::absurd_extreme_comparisons)]
15034        #[allow(unused_comparisons)]
15035        if __tmp.remaining() < Self::ENCODED_LEN {
15036            panic!(
15037                "buffer is too small (need {} bytes, but got {})",
15038                Self::ENCODED_LEN,
15039                __tmp.remaining(),
15040            )
15041        }
15042        __tmp.put_u32_le(self.custom_mode);
15043        __tmp.put_i32_le(self.latitude);
15044        __tmp.put_i32_le(self.longitude);
15045        __tmp.put_i16_le(self.roll);
15046        __tmp.put_i16_le(self.pitch);
15047        __tmp.put_u16_le(self.heading);
15048        __tmp.put_i16_le(self.heading_sp);
15049        __tmp.put_i16_le(self.altitude_amsl);
15050        __tmp.put_i16_le(self.altitude_sp);
15051        __tmp.put_u16_le(self.wp_distance);
15052        __tmp.put_u8(self.base_mode.bits());
15053        __tmp.put_u8(self.landed_state as u8);
15054        __tmp.put_i8(self.throttle);
15055        __tmp.put_u8(self.airspeed);
15056        __tmp.put_u8(self.airspeed_sp);
15057        __tmp.put_u8(self.groundspeed);
15058        __tmp.put_i8(self.climb_rate);
15059        __tmp.put_u8(self.gps_nsat);
15060        __tmp.put_u8(self.gps_fix_type as u8);
15061        __tmp.put_u8(self.battery_remaining);
15062        __tmp.put_i8(self.temperature);
15063        __tmp.put_i8(self.temperature_air);
15064        __tmp.put_u8(self.failsafe);
15065        __tmp.put_u8(self.wp_num);
15066        if matches!(version, MavlinkVersion::V2) {
15067            let len = __tmp.len();
15068            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15069        } else {
15070            __tmp.len()
15071        }
15072    }
15073}
15074#[doc = "id: 235"]
15075#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
15076#[derive(Debug, Clone, PartialEq)]
15077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15078#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15079pub struct HIGH_LATENCY2_DATA {
15080    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
15081    pub timestamp: u32,
15082    #[doc = "Latitude"]
15083    pub latitude: i32,
15084    #[doc = "Longitude"]
15085    pub longitude: i32,
15086    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
15087    pub custom_mode: u16,
15088    #[doc = "Altitude above mean sea level"]
15089    pub altitude: i16,
15090    #[doc = "Altitude setpoint"]
15091    pub target_altitude: i16,
15092    #[doc = "Distance to target waypoint or position"]
15093    pub target_distance: u16,
15094    #[doc = "Current waypoint number"]
15095    pub wp_num: u16,
15096    #[doc = "Bitmap of failure flags."]
15097    pub failure_flags: HlFailureFlag,
15098    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
15099    pub mavtype: MavType,
15100    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
15101    pub autopilot: MavAutopilot,
15102    #[doc = "Heading"]
15103    pub heading: u8,
15104    #[doc = "Heading setpoint"]
15105    pub target_heading: u8,
15106    #[doc = "Throttle"]
15107    pub throttle: u8,
15108    #[doc = "Airspeed"]
15109    pub airspeed: u8,
15110    #[doc = "Airspeed setpoint"]
15111    pub airspeed_sp: u8,
15112    #[doc = "Groundspeed"]
15113    pub groundspeed: u8,
15114    #[doc = "Windspeed"]
15115    pub windspeed: u8,
15116    #[doc = "Wind heading"]
15117    pub wind_heading: u8,
15118    #[doc = "Maximum error horizontal position since last message"]
15119    pub eph: u8,
15120    #[doc = "Maximum error vertical position since last message"]
15121    pub epv: u8,
15122    #[doc = "Air temperature"]
15123    pub temperature_air: i8,
15124    #[doc = "Maximum climb rate magnitude since last message"]
15125    pub climb_rate: i8,
15126    #[doc = "Battery level (-1 if field not provided)."]
15127    pub battery: i8,
15128    #[doc = "Field for custom payload."]
15129    pub custom0: i8,
15130    #[doc = "Field for custom payload."]
15131    pub custom1: i8,
15132    #[doc = "Field for custom payload."]
15133    pub custom2: i8,
15134}
15135impl HIGH_LATENCY2_DATA {
15136    pub const ENCODED_LEN: usize = 42usize;
15137    pub const DEFAULT: Self = Self {
15138        timestamp: 0_u32,
15139        latitude: 0_i32,
15140        longitude: 0_i32,
15141        custom_mode: 0_u16,
15142        altitude: 0_i16,
15143        target_altitude: 0_i16,
15144        target_distance: 0_u16,
15145        wp_num: 0_u16,
15146        failure_flags: HlFailureFlag::DEFAULT,
15147        mavtype: MavType::DEFAULT,
15148        autopilot: MavAutopilot::DEFAULT,
15149        heading: 0_u8,
15150        target_heading: 0_u8,
15151        throttle: 0_u8,
15152        airspeed: 0_u8,
15153        airspeed_sp: 0_u8,
15154        groundspeed: 0_u8,
15155        windspeed: 0_u8,
15156        wind_heading: 0_u8,
15157        eph: 0_u8,
15158        epv: 0_u8,
15159        temperature_air: 0_i8,
15160        climb_rate: 0_i8,
15161        battery: 0_i8,
15162        custom0: 0_i8,
15163        custom1: 0_i8,
15164        custom2: 0_i8,
15165    };
15166    #[cfg(feature = "arbitrary")]
15167    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15168        use arbitrary::{Arbitrary, Unstructured};
15169        let mut buf = [0u8; 1024];
15170        rng.fill_bytes(&mut buf);
15171        let mut unstructured = Unstructured::new(&buf);
15172        Self::arbitrary(&mut unstructured).unwrap_or_default()
15173    }
15174}
15175impl Default for HIGH_LATENCY2_DATA {
15176    fn default() -> Self {
15177        Self::DEFAULT.clone()
15178    }
15179}
15180impl MessageData for HIGH_LATENCY2_DATA {
15181    type Message = MavMessage;
15182    const ID: u32 = 235u32;
15183    const NAME: &'static str = "HIGH_LATENCY2";
15184    const EXTRA_CRC: u8 = 179u8;
15185    const ENCODED_LEN: usize = 42usize;
15186    fn deser(
15187        _version: MavlinkVersion,
15188        __input: &[u8],
15189    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15190        let avail_len = __input.len();
15191        let mut payload_buf = [0; Self::ENCODED_LEN];
15192        let mut buf = if avail_len < Self::ENCODED_LEN {
15193            payload_buf[0..avail_len].copy_from_slice(__input);
15194            Bytes::new(&payload_buf)
15195        } else {
15196            Bytes::new(__input)
15197        };
15198        let mut __struct = Self::default();
15199        __struct.timestamp = buf.get_u32_le();
15200        __struct.latitude = buf.get_i32_le();
15201        __struct.longitude = buf.get_i32_le();
15202        __struct.custom_mode = buf.get_u16_le();
15203        __struct.altitude = buf.get_i16_le();
15204        __struct.target_altitude = buf.get_i16_le();
15205        __struct.target_distance = buf.get_u16_le();
15206        __struct.wp_num = buf.get_u16_le();
15207        let tmp = buf.get_u16_le();
15208        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
15209            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15210                flag_type: "HlFailureFlag",
15211                value: tmp as u32,
15212            })?;
15213        let tmp = buf.get_u8();
15214        __struct.mavtype =
15215            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15216                enum_type: "MavType",
15217                value: tmp as u32,
15218            })?;
15219        let tmp = buf.get_u8();
15220        __struct.autopilot =
15221            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15222                enum_type: "MavAutopilot",
15223                value: tmp as u32,
15224            })?;
15225        __struct.heading = buf.get_u8();
15226        __struct.target_heading = buf.get_u8();
15227        __struct.throttle = buf.get_u8();
15228        __struct.airspeed = buf.get_u8();
15229        __struct.airspeed_sp = buf.get_u8();
15230        __struct.groundspeed = buf.get_u8();
15231        __struct.windspeed = buf.get_u8();
15232        __struct.wind_heading = buf.get_u8();
15233        __struct.eph = buf.get_u8();
15234        __struct.epv = buf.get_u8();
15235        __struct.temperature_air = buf.get_i8();
15236        __struct.climb_rate = buf.get_i8();
15237        __struct.battery = buf.get_i8();
15238        __struct.custom0 = buf.get_i8();
15239        __struct.custom1 = buf.get_i8();
15240        __struct.custom2 = buf.get_i8();
15241        Ok(__struct)
15242    }
15243    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15244        let mut __tmp = BytesMut::new(bytes);
15245        #[allow(clippy::absurd_extreme_comparisons)]
15246        #[allow(unused_comparisons)]
15247        if __tmp.remaining() < Self::ENCODED_LEN {
15248            panic!(
15249                "buffer is too small (need {} bytes, but got {})",
15250                Self::ENCODED_LEN,
15251                __tmp.remaining(),
15252            )
15253        }
15254        __tmp.put_u32_le(self.timestamp);
15255        __tmp.put_i32_le(self.latitude);
15256        __tmp.put_i32_le(self.longitude);
15257        __tmp.put_u16_le(self.custom_mode);
15258        __tmp.put_i16_le(self.altitude);
15259        __tmp.put_i16_le(self.target_altitude);
15260        __tmp.put_u16_le(self.target_distance);
15261        __tmp.put_u16_le(self.wp_num);
15262        __tmp.put_u16_le(self.failure_flags.bits());
15263        __tmp.put_u8(self.mavtype as u8);
15264        __tmp.put_u8(self.autopilot as u8);
15265        __tmp.put_u8(self.heading);
15266        __tmp.put_u8(self.target_heading);
15267        __tmp.put_u8(self.throttle);
15268        __tmp.put_u8(self.airspeed);
15269        __tmp.put_u8(self.airspeed_sp);
15270        __tmp.put_u8(self.groundspeed);
15271        __tmp.put_u8(self.windspeed);
15272        __tmp.put_u8(self.wind_heading);
15273        __tmp.put_u8(self.eph);
15274        __tmp.put_u8(self.epv);
15275        __tmp.put_i8(self.temperature_air);
15276        __tmp.put_i8(self.climb_rate);
15277        __tmp.put_i8(self.battery);
15278        __tmp.put_i8(self.custom0);
15279        __tmp.put_i8(self.custom1);
15280        __tmp.put_i8(self.custom2);
15281        if matches!(version, MavlinkVersion::V2) {
15282            let len = __tmp.len();
15283            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15284        } else {
15285            __tmp.len()
15286        }
15287    }
15288}
15289#[doc = "id: 93"]
15290#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
15291#[derive(Debug, Clone, PartialEq)]
15292#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15293#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15294pub struct HIL_ACTUATOR_CONTROLS_DATA {
15295    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15296    pub time_usec: u64,
15297    #[doc = "Flags bitmask."]
15298    pub flags: HilActuatorControlsFlags,
15299    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
15300    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15301    pub controls: [f32; 16],
15302    #[doc = "System mode. Includes arming state."]
15303    pub mode: MavModeFlag,
15304}
15305impl HIL_ACTUATOR_CONTROLS_DATA {
15306    pub const ENCODED_LEN: usize = 81usize;
15307    pub const DEFAULT: Self = Self {
15308        time_usec: 0_u64,
15309        flags: HilActuatorControlsFlags::DEFAULT,
15310        controls: [0.0_f32; 16usize],
15311        mode: MavModeFlag::DEFAULT,
15312    };
15313    #[cfg(feature = "arbitrary")]
15314    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15315        use arbitrary::{Arbitrary, Unstructured};
15316        let mut buf = [0u8; 1024];
15317        rng.fill_bytes(&mut buf);
15318        let mut unstructured = Unstructured::new(&buf);
15319        Self::arbitrary(&mut unstructured).unwrap_or_default()
15320    }
15321}
15322impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15323    fn default() -> Self {
15324        Self::DEFAULT.clone()
15325    }
15326}
15327impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15328    type Message = MavMessage;
15329    const ID: u32 = 93u32;
15330    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15331    const EXTRA_CRC: u8 = 47u8;
15332    const ENCODED_LEN: usize = 81usize;
15333    fn deser(
15334        _version: MavlinkVersion,
15335        __input: &[u8],
15336    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15337        let avail_len = __input.len();
15338        let mut payload_buf = [0; Self::ENCODED_LEN];
15339        let mut buf = if avail_len < Self::ENCODED_LEN {
15340            payload_buf[0..avail_len].copy_from_slice(__input);
15341            Bytes::new(&payload_buf)
15342        } else {
15343            Bytes::new(__input)
15344        };
15345        let mut __struct = Self::default();
15346        __struct.time_usec = buf.get_u64_le();
15347        let tmp = buf.get_u64_le();
15348        __struct.flags =
15349            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15350                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15351                    flag_type: "HilActuatorControlsFlags",
15352                    value: tmp as u32,
15353                })?;
15354        for v in &mut __struct.controls {
15355            let val = buf.get_f32_le();
15356            *v = val;
15357        }
15358        let tmp = buf.get_u8();
15359        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15360            ::mavlink_core::error::ParserError::InvalidFlag {
15361                flag_type: "MavModeFlag",
15362                value: tmp as u32,
15363            },
15364        )?;
15365        Ok(__struct)
15366    }
15367    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15368        let mut __tmp = BytesMut::new(bytes);
15369        #[allow(clippy::absurd_extreme_comparisons)]
15370        #[allow(unused_comparisons)]
15371        if __tmp.remaining() < Self::ENCODED_LEN {
15372            panic!(
15373                "buffer is too small (need {} bytes, but got {})",
15374                Self::ENCODED_LEN,
15375                __tmp.remaining(),
15376            )
15377        }
15378        __tmp.put_u64_le(self.time_usec);
15379        __tmp.put_u64_le(self.flags.bits());
15380        for val in &self.controls {
15381            __tmp.put_f32_le(*val);
15382        }
15383        __tmp.put_u8(self.mode.bits());
15384        if matches!(version, MavlinkVersion::V2) {
15385            let len = __tmp.len();
15386            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15387        } else {
15388            __tmp.len()
15389        }
15390    }
15391}
15392#[doc = "id: 91"]
15393#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15394#[derive(Debug, Clone, PartialEq)]
15395#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15396#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15397pub struct HIL_CONTROLS_DATA {
15398    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15399    pub time_usec: u64,
15400    #[doc = "Control output -1 .. 1"]
15401    pub roll_ailerons: f32,
15402    #[doc = "Control output -1 .. 1"]
15403    pub pitch_elevator: f32,
15404    #[doc = "Control output -1 .. 1"]
15405    pub yaw_rudder: f32,
15406    #[doc = "Throttle 0 .. 1"]
15407    pub throttle: f32,
15408    #[doc = "Aux 1, -1 .. 1"]
15409    pub aux1: f32,
15410    #[doc = "Aux 2, -1 .. 1"]
15411    pub aux2: f32,
15412    #[doc = "Aux 3, -1 .. 1"]
15413    pub aux3: f32,
15414    #[doc = "Aux 4, -1 .. 1"]
15415    pub aux4: f32,
15416    #[doc = "System mode."]
15417    pub mode: MavMode,
15418    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15419    pub nav_mode: u8,
15420}
15421impl HIL_CONTROLS_DATA {
15422    pub const ENCODED_LEN: usize = 42usize;
15423    pub const DEFAULT: Self = Self {
15424        time_usec: 0_u64,
15425        roll_ailerons: 0.0_f32,
15426        pitch_elevator: 0.0_f32,
15427        yaw_rudder: 0.0_f32,
15428        throttle: 0.0_f32,
15429        aux1: 0.0_f32,
15430        aux2: 0.0_f32,
15431        aux3: 0.0_f32,
15432        aux4: 0.0_f32,
15433        mode: MavMode::DEFAULT,
15434        nav_mode: 0_u8,
15435    };
15436    #[cfg(feature = "arbitrary")]
15437    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15438        use arbitrary::{Arbitrary, Unstructured};
15439        let mut buf = [0u8; 1024];
15440        rng.fill_bytes(&mut buf);
15441        let mut unstructured = Unstructured::new(&buf);
15442        Self::arbitrary(&mut unstructured).unwrap_or_default()
15443    }
15444}
15445impl Default for HIL_CONTROLS_DATA {
15446    fn default() -> Self {
15447        Self::DEFAULT.clone()
15448    }
15449}
15450impl MessageData for HIL_CONTROLS_DATA {
15451    type Message = MavMessage;
15452    const ID: u32 = 91u32;
15453    const NAME: &'static str = "HIL_CONTROLS";
15454    const EXTRA_CRC: u8 = 63u8;
15455    const ENCODED_LEN: usize = 42usize;
15456    fn deser(
15457        _version: MavlinkVersion,
15458        __input: &[u8],
15459    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15460        let avail_len = __input.len();
15461        let mut payload_buf = [0; Self::ENCODED_LEN];
15462        let mut buf = if avail_len < Self::ENCODED_LEN {
15463            payload_buf[0..avail_len].copy_from_slice(__input);
15464            Bytes::new(&payload_buf)
15465        } else {
15466            Bytes::new(__input)
15467        };
15468        let mut __struct = Self::default();
15469        __struct.time_usec = buf.get_u64_le();
15470        __struct.roll_ailerons = buf.get_f32_le();
15471        __struct.pitch_elevator = buf.get_f32_le();
15472        __struct.yaw_rudder = buf.get_f32_le();
15473        __struct.throttle = buf.get_f32_le();
15474        __struct.aux1 = buf.get_f32_le();
15475        __struct.aux2 = buf.get_f32_le();
15476        __struct.aux3 = buf.get_f32_le();
15477        __struct.aux4 = buf.get_f32_le();
15478        let tmp = buf.get_u8();
15479        __struct.mode =
15480            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15481                enum_type: "MavMode",
15482                value: tmp as u32,
15483            })?;
15484        __struct.nav_mode = buf.get_u8();
15485        Ok(__struct)
15486    }
15487    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15488        let mut __tmp = BytesMut::new(bytes);
15489        #[allow(clippy::absurd_extreme_comparisons)]
15490        #[allow(unused_comparisons)]
15491        if __tmp.remaining() < Self::ENCODED_LEN {
15492            panic!(
15493                "buffer is too small (need {} bytes, but got {})",
15494                Self::ENCODED_LEN,
15495                __tmp.remaining(),
15496            )
15497        }
15498        __tmp.put_u64_le(self.time_usec);
15499        __tmp.put_f32_le(self.roll_ailerons);
15500        __tmp.put_f32_le(self.pitch_elevator);
15501        __tmp.put_f32_le(self.yaw_rudder);
15502        __tmp.put_f32_le(self.throttle);
15503        __tmp.put_f32_le(self.aux1);
15504        __tmp.put_f32_le(self.aux2);
15505        __tmp.put_f32_le(self.aux3);
15506        __tmp.put_f32_le(self.aux4);
15507        __tmp.put_u8(self.mode as u8);
15508        __tmp.put_u8(self.nav_mode);
15509        if matches!(version, MavlinkVersion::V2) {
15510            let len = __tmp.len();
15511            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15512        } else {
15513            __tmp.len()
15514        }
15515    }
15516}
15517#[doc = "id: 113"]
15518#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15519#[derive(Debug, Clone, PartialEq)]
15520#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15521#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15522pub struct HIL_GPS_DATA {
15523    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15524    pub time_usec: u64,
15525    #[doc = "Latitude (WGS84)"]
15526    pub lat: i32,
15527    #[doc = "Longitude (WGS84)"]
15528    pub lon: i32,
15529    #[doc = "Altitude (MSL). Positive for up."]
15530    pub alt: i32,
15531    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15532    pub eph: u16,
15533    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15534    pub epv: u16,
15535    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15536    pub vel: u16,
15537    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15538    pub vn: i16,
15539    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15540    pub ve: i16,
15541    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15542    pub vd: i16,
15543    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15544    pub cog: u16,
15545    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15546    pub fix_type: u8,
15547    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15548    pub satellites_visible: u8,
15549    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15550    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15551    pub id: u8,
15552    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15553    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15554    pub yaw: u16,
15555}
15556impl HIL_GPS_DATA {
15557    pub const ENCODED_LEN: usize = 39usize;
15558    pub const DEFAULT: Self = Self {
15559        time_usec: 0_u64,
15560        lat: 0_i32,
15561        lon: 0_i32,
15562        alt: 0_i32,
15563        eph: 0_u16,
15564        epv: 0_u16,
15565        vel: 0_u16,
15566        vn: 0_i16,
15567        ve: 0_i16,
15568        vd: 0_i16,
15569        cog: 0_u16,
15570        fix_type: 0_u8,
15571        satellites_visible: 0_u8,
15572        id: 0_u8,
15573        yaw: 0_u16,
15574    };
15575    #[cfg(feature = "arbitrary")]
15576    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15577        use arbitrary::{Arbitrary, Unstructured};
15578        let mut buf = [0u8; 1024];
15579        rng.fill_bytes(&mut buf);
15580        let mut unstructured = Unstructured::new(&buf);
15581        Self::arbitrary(&mut unstructured).unwrap_or_default()
15582    }
15583}
15584impl Default for HIL_GPS_DATA {
15585    fn default() -> Self {
15586        Self::DEFAULT.clone()
15587    }
15588}
15589impl MessageData for HIL_GPS_DATA {
15590    type Message = MavMessage;
15591    const ID: u32 = 113u32;
15592    const NAME: &'static str = "HIL_GPS";
15593    const EXTRA_CRC: u8 = 124u8;
15594    const ENCODED_LEN: usize = 39usize;
15595    fn deser(
15596        _version: MavlinkVersion,
15597        __input: &[u8],
15598    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15599        let avail_len = __input.len();
15600        let mut payload_buf = [0; Self::ENCODED_LEN];
15601        let mut buf = if avail_len < Self::ENCODED_LEN {
15602            payload_buf[0..avail_len].copy_from_slice(__input);
15603            Bytes::new(&payload_buf)
15604        } else {
15605            Bytes::new(__input)
15606        };
15607        let mut __struct = Self::default();
15608        __struct.time_usec = buf.get_u64_le();
15609        __struct.lat = buf.get_i32_le();
15610        __struct.lon = buf.get_i32_le();
15611        __struct.alt = buf.get_i32_le();
15612        __struct.eph = buf.get_u16_le();
15613        __struct.epv = buf.get_u16_le();
15614        __struct.vel = buf.get_u16_le();
15615        __struct.vn = buf.get_i16_le();
15616        __struct.ve = buf.get_i16_le();
15617        __struct.vd = buf.get_i16_le();
15618        __struct.cog = buf.get_u16_le();
15619        __struct.fix_type = buf.get_u8();
15620        __struct.satellites_visible = buf.get_u8();
15621        __struct.id = buf.get_u8();
15622        __struct.yaw = buf.get_u16_le();
15623        Ok(__struct)
15624    }
15625    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15626        let mut __tmp = BytesMut::new(bytes);
15627        #[allow(clippy::absurd_extreme_comparisons)]
15628        #[allow(unused_comparisons)]
15629        if __tmp.remaining() < Self::ENCODED_LEN {
15630            panic!(
15631                "buffer is too small (need {} bytes, but got {})",
15632                Self::ENCODED_LEN,
15633                __tmp.remaining(),
15634            )
15635        }
15636        __tmp.put_u64_le(self.time_usec);
15637        __tmp.put_i32_le(self.lat);
15638        __tmp.put_i32_le(self.lon);
15639        __tmp.put_i32_le(self.alt);
15640        __tmp.put_u16_le(self.eph);
15641        __tmp.put_u16_le(self.epv);
15642        __tmp.put_u16_le(self.vel);
15643        __tmp.put_i16_le(self.vn);
15644        __tmp.put_i16_le(self.ve);
15645        __tmp.put_i16_le(self.vd);
15646        __tmp.put_u16_le(self.cog);
15647        __tmp.put_u8(self.fix_type);
15648        __tmp.put_u8(self.satellites_visible);
15649        __tmp.put_u8(self.id);
15650        __tmp.put_u16_le(self.yaw);
15651        if matches!(version, MavlinkVersion::V2) {
15652            let len = __tmp.len();
15653            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15654        } else {
15655            __tmp.len()
15656        }
15657    }
15658}
15659#[doc = "id: 114"]
15660#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15661#[derive(Debug, Clone, PartialEq)]
15662#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15664pub struct HIL_OPTICAL_FLOW_DATA {
15665    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15666    pub time_usec: u64,
15667    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15668    pub integration_time_us: u32,
15669    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15670    pub integrated_x: f32,
15671    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15672    pub integrated_y: f32,
15673    #[doc = "RH rotation around X axis"]
15674    pub integrated_xgyro: f32,
15675    #[doc = "RH rotation around Y axis"]
15676    pub integrated_ygyro: f32,
15677    #[doc = "RH rotation around Z axis"]
15678    pub integrated_zgyro: f32,
15679    #[doc = "Time since the distance was sampled."]
15680    pub time_delta_distance_us: u32,
15681    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15682    pub distance: f32,
15683    #[doc = "Temperature"]
15684    pub temperature: i16,
15685    #[doc = "Sensor ID"]
15686    pub sensor_id: u8,
15687    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15688    pub quality: u8,
15689}
15690impl HIL_OPTICAL_FLOW_DATA {
15691    pub const ENCODED_LEN: usize = 44usize;
15692    pub const DEFAULT: Self = Self {
15693        time_usec: 0_u64,
15694        integration_time_us: 0_u32,
15695        integrated_x: 0.0_f32,
15696        integrated_y: 0.0_f32,
15697        integrated_xgyro: 0.0_f32,
15698        integrated_ygyro: 0.0_f32,
15699        integrated_zgyro: 0.0_f32,
15700        time_delta_distance_us: 0_u32,
15701        distance: 0.0_f32,
15702        temperature: 0_i16,
15703        sensor_id: 0_u8,
15704        quality: 0_u8,
15705    };
15706    #[cfg(feature = "arbitrary")]
15707    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15708        use arbitrary::{Arbitrary, Unstructured};
15709        let mut buf = [0u8; 1024];
15710        rng.fill_bytes(&mut buf);
15711        let mut unstructured = Unstructured::new(&buf);
15712        Self::arbitrary(&mut unstructured).unwrap_or_default()
15713    }
15714}
15715impl Default for HIL_OPTICAL_FLOW_DATA {
15716    fn default() -> Self {
15717        Self::DEFAULT.clone()
15718    }
15719}
15720impl MessageData for HIL_OPTICAL_FLOW_DATA {
15721    type Message = MavMessage;
15722    const ID: u32 = 114u32;
15723    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15724    const EXTRA_CRC: u8 = 237u8;
15725    const ENCODED_LEN: usize = 44usize;
15726    fn deser(
15727        _version: MavlinkVersion,
15728        __input: &[u8],
15729    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15730        let avail_len = __input.len();
15731        let mut payload_buf = [0; Self::ENCODED_LEN];
15732        let mut buf = if avail_len < Self::ENCODED_LEN {
15733            payload_buf[0..avail_len].copy_from_slice(__input);
15734            Bytes::new(&payload_buf)
15735        } else {
15736            Bytes::new(__input)
15737        };
15738        let mut __struct = Self::default();
15739        __struct.time_usec = buf.get_u64_le();
15740        __struct.integration_time_us = buf.get_u32_le();
15741        __struct.integrated_x = buf.get_f32_le();
15742        __struct.integrated_y = buf.get_f32_le();
15743        __struct.integrated_xgyro = buf.get_f32_le();
15744        __struct.integrated_ygyro = buf.get_f32_le();
15745        __struct.integrated_zgyro = buf.get_f32_le();
15746        __struct.time_delta_distance_us = buf.get_u32_le();
15747        __struct.distance = buf.get_f32_le();
15748        __struct.temperature = buf.get_i16_le();
15749        __struct.sensor_id = buf.get_u8();
15750        __struct.quality = buf.get_u8();
15751        Ok(__struct)
15752    }
15753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15754        let mut __tmp = BytesMut::new(bytes);
15755        #[allow(clippy::absurd_extreme_comparisons)]
15756        #[allow(unused_comparisons)]
15757        if __tmp.remaining() < Self::ENCODED_LEN {
15758            panic!(
15759                "buffer is too small (need {} bytes, but got {})",
15760                Self::ENCODED_LEN,
15761                __tmp.remaining(),
15762            )
15763        }
15764        __tmp.put_u64_le(self.time_usec);
15765        __tmp.put_u32_le(self.integration_time_us);
15766        __tmp.put_f32_le(self.integrated_x);
15767        __tmp.put_f32_le(self.integrated_y);
15768        __tmp.put_f32_le(self.integrated_xgyro);
15769        __tmp.put_f32_le(self.integrated_ygyro);
15770        __tmp.put_f32_le(self.integrated_zgyro);
15771        __tmp.put_u32_le(self.time_delta_distance_us);
15772        __tmp.put_f32_le(self.distance);
15773        __tmp.put_i16_le(self.temperature);
15774        __tmp.put_u8(self.sensor_id);
15775        __tmp.put_u8(self.quality);
15776        if matches!(version, MavlinkVersion::V2) {
15777            let len = __tmp.len();
15778            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15779        } else {
15780            __tmp.len()
15781        }
15782    }
15783}
15784#[doc = "id: 92"]
15785#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15786#[derive(Debug, Clone, PartialEq)]
15787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15789pub struct HIL_RC_INPUTS_RAW_DATA {
15790    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15791    pub time_usec: u64,
15792    #[doc = "RC channel 1 value"]
15793    pub chan1_raw: u16,
15794    #[doc = "RC channel 2 value"]
15795    pub chan2_raw: u16,
15796    #[doc = "RC channel 3 value"]
15797    pub chan3_raw: u16,
15798    #[doc = "RC channel 4 value"]
15799    pub chan4_raw: u16,
15800    #[doc = "RC channel 5 value"]
15801    pub chan5_raw: u16,
15802    #[doc = "RC channel 6 value"]
15803    pub chan6_raw: u16,
15804    #[doc = "RC channel 7 value"]
15805    pub chan7_raw: u16,
15806    #[doc = "RC channel 8 value"]
15807    pub chan8_raw: u16,
15808    #[doc = "RC channel 9 value"]
15809    pub chan9_raw: u16,
15810    #[doc = "RC channel 10 value"]
15811    pub chan10_raw: u16,
15812    #[doc = "RC channel 11 value"]
15813    pub chan11_raw: u16,
15814    #[doc = "RC channel 12 value"]
15815    pub chan12_raw: u16,
15816    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
15817    pub rssi: u8,
15818}
15819impl HIL_RC_INPUTS_RAW_DATA {
15820    pub const ENCODED_LEN: usize = 33usize;
15821    pub const DEFAULT: Self = Self {
15822        time_usec: 0_u64,
15823        chan1_raw: 0_u16,
15824        chan2_raw: 0_u16,
15825        chan3_raw: 0_u16,
15826        chan4_raw: 0_u16,
15827        chan5_raw: 0_u16,
15828        chan6_raw: 0_u16,
15829        chan7_raw: 0_u16,
15830        chan8_raw: 0_u16,
15831        chan9_raw: 0_u16,
15832        chan10_raw: 0_u16,
15833        chan11_raw: 0_u16,
15834        chan12_raw: 0_u16,
15835        rssi: 0_u8,
15836    };
15837    #[cfg(feature = "arbitrary")]
15838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15839        use arbitrary::{Arbitrary, Unstructured};
15840        let mut buf = [0u8; 1024];
15841        rng.fill_bytes(&mut buf);
15842        let mut unstructured = Unstructured::new(&buf);
15843        Self::arbitrary(&mut unstructured).unwrap_or_default()
15844    }
15845}
15846impl Default for HIL_RC_INPUTS_RAW_DATA {
15847    fn default() -> Self {
15848        Self::DEFAULT.clone()
15849    }
15850}
15851impl MessageData for HIL_RC_INPUTS_RAW_DATA {
15852    type Message = MavMessage;
15853    const ID: u32 = 92u32;
15854    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
15855    const EXTRA_CRC: u8 = 54u8;
15856    const ENCODED_LEN: usize = 33usize;
15857    fn deser(
15858        _version: MavlinkVersion,
15859        __input: &[u8],
15860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15861        let avail_len = __input.len();
15862        let mut payload_buf = [0; Self::ENCODED_LEN];
15863        let mut buf = if avail_len < Self::ENCODED_LEN {
15864            payload_buf[0..avail_len].copy_from_slice(__input);
15865            Bytes::new(&payload_buf)
15866        } else {
15867            Bytes::new(__input)
15868        };
15869        let mut __struct = Self::default();
15870        __struct.time_usec = buf.get_u64_le();
15871        __struct.chan1_raw = buf.get_u16_le();
15872        __struct.chan2_raw = buf.get_u16_le();
15873        __struct.chan3_raw = buf.get_u16_le();
15874        __struct.chan4_raw = buf.get_u16_le();
15875        __struct.chan5_raw = buf.get_u16_le();
15876        __struct.chan6_raw = buf.get_u16_le();
15877        __struct.chan7_raw = buf.get_u16_le();
15878        __struct.chan8_raw = buf.get_u16_le();
15879        __struct.chan9_raw = buf.get_u16_le();
15880        __struct.chan10_raw = buf.get_u16_le();
15881        __struct.chan11_raw = buf.get_u16_le();
15882        __struct.chan12_raw = buf.get_u16_le();
15883        __struct.rssi = buf.get_u8();
15884        Ok(__struct)
15885    }
15886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15887        let mut __tmp = BytesMut::new(bytes);
15888        #[allow(clippy::absurd_extreme_comparisons)]
15889        #[allow(unused_comparisons)]
15890        if __tmp.remaining() < Self::ENCODED_LEN {
15891            panic!(
15892                "buffer is too small (need {} bytes, but got {})",
15893                Self::ENCODED_LEN,
15894                __tmp.remaining(),
15895            )
15896        }
15897        __tmp.put_u64_le(self.time_usec);
15898        __tmp.put_u16_le(self.chan1_raw);
15899        __tmp.put_u16_le(self.chan2_raw);
15900        __tmp.put_u16_le(self.chan3_raw);
15901        __tmp.put_u16_le(self.chan4_raw);
15902        __tmp.put_u16_le(self.chan5_raw);
15903        __tmp.put_u16_le(self.chan6_raw);
15904        __tmp.put_u16_le(self.chan7_raw);
15905        __tmp.put_u16_le(self.chan8_raw);
15906        __tmp.put_u16_le(self.chan9_raw);
15907        __tmp.put_u16_le(self.chan10_raw);
15908        __tmp.put_u16_le(self.chan11_raw);
15909        __tmp.put_u16_le(self.chan12_raw);
15910        __tmp.put_u8(self.rssi);
15911        if matches!(version, MavlinkVersion::V2) {
15912            let len = __tmp.len();
15913            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15914        } else {
15915            __tmp.len()
15916        }
15917    }
15918}
15919#[doc = "id: 107"]
15920#[doc = "The IMU readings in SI units in NED body frame."]
15921#[derive(Debug, Clone, PartialEq)]
15922#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15923#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15924pub struct HIL_SENSOR_DATA {
15925    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15926    pub time_usec: u64,
15927    #[doc = "X acceleration"]
15928    pub xacc: f32,
15929    #[doc = "Y acceleration"]
15930    pub yacc: f32,
15931    #[doc = "Z acceleration"]
15932    pub zacc: f32,
15933    #[doc = "Angular speed around X axis in body frame"]
15934    pub xgyro: f32,
15935    #[doc = "Angular speed around Y axis in body frame"]
15936    pub ygyro: f32,
15937    #[doc = "Angular speed around Z axis in body frame"]
15938    pub zgyro: f32,
15939    #[doc = "X Magnetic field"]
15940    pub xmag: f32,
15941    #[doc = "Y Magnetic field"]
15942    pub ymag: f32,
15943    #[doc = "Z Magnetic field"]
15944    pub zmag: f32,
15945    #[doc = "Absolute pressure"]
15946    pub abs_pressure: f32,
15947    #[doc = "Differential pressure (airspeed)"]
15948    pub diff_pressure: f32,
15949    #[doc = "Altitude calculated from pressure"]
15950    pub pressure_alt: f32,
15951    #[doc = "Temperature"]
15952    pub temperature: f32,
15953    #[doc = "Bitmap for fields that have updated since last message"]
15954    pub fields_updated: HilSensorUpdatedFlags,
15955    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
15956    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15957    pub id: u8,
15958}
15959impl HIL_SENSOR_DATA {
15960    pub const ENCODED_LEN: usize = 65usize;
15961    pub const DEFAULT: Self = Self {
15962        time_usec: 0_u64,
15963        xacc: 0.0_f32,
15964        yacc: 0.0_f32,
15965        zacc: 0.0_f32,
15966        xgyro: 0.0_f32,
15967        ygyro: 0.0_f32,
15968        zgyro: 0.0_f32,
15969        xmag: 0.0_f32,
15970        ymag: 0.0_f32,
15971        zmag: 0.0_f32,
15972        abs_pressure: 0.0_f32,
15973        diff_pressure: 0.0_f32,
15974        pressure_alt: 0.0_f32,
15975        temperature: 0.0_f32,
15976        fields_updated: HilSensorUpdatedFlags::DEFAULT,
15977        id: 0_u8,
15978    };
15979    #[cfg(feature = "arbitrary")]
15980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15981        use arbitrary::{Arbitrary, Unstructured};
15982        let mut buf = [0u8; 1024];
15983        rng.fill_bytes(&mut buf);
15984        let mut unstructured = Unstructured::new(&buf);
15985        Self::arbitrary(&mut unstructured).unwrap_or_default()
15986    }
15987}
15988impl Default for HIL_SENSOR_DATA {
15989    fn default() -> Self {
15990        Self::DEFAULT.clone()
15991    }
15992}
15993impl MessageData for HIL_SENSOR_DATA {
15994    type Message = MavMessage;
15995    const ID: u32 = 107u32;
15996    const NAME: &'static str = "HIL_SENSOR";
15997    const EXTRA_CRC: u8 = 108u8;
15998    const ENCODED_LEN: usize = 65usize;
15999    fn deser(
16000        _version: MavlinkVersion,
16001        __input: &[u8],
16002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16003        let avail_len = __input.len();
16004        let mut payload_buf = [0; Self::ENCODED_LEN];
16005        let mut buf = if avail_len < Self::ENCODED_LEN {
16006            payload_buf[0..avail_len].copy_from_slice(__input);
16007            Bytes::new(&payload_buf)
16008        } else {
16009            Bytes::new(__input)
16010        };
16011        let mut __struct = Self::default();
16012        __struct.time_usec = buf.get_u64_le();
16013        __struct.xacc = buf.get_f32_le();
16014        __struct.yacc = buf.get_f32_le();
16015        __struct.zacc = buf.get_f32_le();
16016        __struct.xgyro = buf.get_f32_le();
16017        __struct.ygyro = buf.get_f32_le();
16018        __struct.zgyro = buf.get_f32_le();
16019        __struct.xmag = buf.get_f32_le();
16020        __struct.ymag = buf.get_f32_le();
16021        __struct.zmag = buf.get_f32_le();
16022        __struct.abs_pressure = buf.get_f32_le();
16023        __struct.diff_pressure = buf.get_f32_le();
16024        __struct.pressure_alt = buf.get_f32_le();
16025        __struct.temperature = buf.get_f32_le();
16026        let tmp = buf.get_u32_le();
16027        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
16028            tmp & HilSensorUpdatedFlags::all().bits(),
16029        )
16030        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16031            flag_type: "HilSensorUpdatedFlags",
16032            value: tmp as u32,
16033        })?;
16034        __struct.id = buf.get_u8();
16035        Ok(__struct)
16036    }
16037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16038        let mut __tmp = BytesMut::new(bytes);
16039        #[allow(clippy::absurd_extreme_comparisons)]
16040        #[allow(unused_comparisons)]
16041        if __tmp.remaining() < Self::ENCODED_LEN {
16042            panic!(
16043                "buffer is too small (need {} bytes, but got {})",
16044                Self::ENCODED_LEN,
16045                __tmp.remaining(),
16046            )
16047        }
16048        __tmp.put_u64_le(self.time_usec);
16049        __tmp.put_f32_le(self.xacc);
16050        __tmp.put_f32_le(self.yacc);
16051        __tmp.put_f32_le(self.zacc);
16052        __tmp.put_f32_le(self.xgyro);
16053        __tmp.put_f32_le(self.ygyro);
16054        __tmp.put_f32_le(self.zgyro);
16055        __tmp.put_f32_le(self.xmag);
16056        __tmp.put_f32_le(self.ymag);
16057        __tmp.put_f32_le(self.zmag);
16058        __tmp.put_f32_le(self.abs_pressure);
16059        __tmp.put_f32_le(self.diff_pressure);
16060        __tmp.put_f32_le(self.pressure_alt);
16061        __tmp.put_f32_le(self.temperature);
16062        __tmp.put_u32_le(self.fields_updated.bits());
16063        __tmp.put_u8(self.id);
16064        if matches!(version, MavlinkVersion::V2) {
16065            let len = __tmp.len();
16066            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16067        } else {
16068            __tmp.len()
16069        }
16070    }
16071}
16072#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
16073#[doc = "id: 90"]
16074#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16075#[derive(Debug, Clone, PartialEq)]
16076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16078pub struct HIL_STATE_DATA {
16079    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16080    pub time_usec: u64,
16081    #[doc = "Roll angle"]
16082    pub roll: f32,
16083    #[doc = "Pitch angle"]
16084    pub pitch: f32,
16085    #[doc = "Yaw angle"]
16086    pub yaw: f32,
16087    #[doc = "Body frame roll / phi angular speed"]
16088    pub rollspeed: f32,
16089    #[doc = "Body frame pitch / theta angular speed"]
16090    pub pitchspeed: f32,
16091    #[doc = "Body frame yaw / psi angular speed"]
16092    pub yawspeed: f32,
16093    #[doc = "Latitude"]
16094    pub lat: i32,
16095    #[doc = "Longitude"]
16096    pub lon: i32,
16097    #[doc = "Altitude"]
16098    pub alt: i32,
16099    #[doc = "Ground X Speed (Latitude)"]
16100    pub vx: i16,
16101    #[doc = "Ground Y Speed (Longitude)"]
16102    pub vy: i16,
16103    #[doc = "Ground Z Speed (Altitude)"]
16104    pub vz: i16,
16105    #[doc = "X acceleration"]
16106    pub xacc: i16,
16107    #[doc = "Y acceleration"]
16108    pub yacc: i16,
16109    #[doc = "Z acceleration"]
16110    pub zacc: i16,
16111}
16112impl HIL_STATE_DATA {
16113    pub const ENCODED_LEN: usize = 56usize;
16114    pub const DEFAULT: Self = Self {
16115        time_usec: 0_u64,
16116        roll: 0.0_f32,
16117        pitch: 0.0_f32,
16118        yaw: 0.0_f32,
16119        rollspeed: 0.0_f32,
16120        pitchspeed: 0.0_f32,
16121        yawspeed: 0.0_f32,
16122        lat: 0_i32,
16123        lon: 0_i32,
16124        alt: 0_i32,
16125        vx: 0_i16,
16126        vy: 0_i16,
16127        vz: 0_i16,
16128        xacc: 0_i16,
16129        yacc: 0_i16,
16130        zacc: 0_i16,
16131    };
16132    #[cfg(feature = "arbitrary")]
16133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16134        use arbitrary::{Arbitrary, Unstructured};
16135        let mut buf = [0u8; 1024];
16136        rng.fill_bytes(&mut buf);
16137        let mut unstructured = Unstructured::new(&buf);
16138        Self::arbitrary(&mut unstructured).unwrap_or_default()
16139    }
16140}
16141impl Default for HIL_STATE_DATA {
16142    fn default() -> Self {
16143        Self::DEFAULT.clone()
16144    }
16145}
16146impl MessageData for HIL_STATE_DATA {
16147    type Message = MavMessage;
16148    const ID: u32 = 90u32;
16149    const NAME: &'static str = "HIL_STATE";
16150    const EXTRA_CRC: u8 = 183u8;
16151    const ENCODED_LEN: usize = 56usize;
16152    fn deser(
16153        _version: MavlinkVersion,
16154        __input: &[u8],
16155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16156        let avail_len = __input.len();
16157        let mut payload_buf = [0; Self::ENCODED_LEN];
16158        let mut buf = if avail_len < Self::ENCODED_LEN {
16159            payload_buf[0..avail_len].copy_from_slice(__input);
16160            Bytes::new(&payload_buf)
16161        } else {
16162            Bytes::new(__input)
16163        };
16164        let mut __struct = Self::default();
16165        __struct.time_usec = buf.get_u64_le();
16166        __struct.roll = buf.get_f32_le();
16167        __struct.pitch = buf.get_f32_le();
16168        __struct.yaw = buf.get_f32_le();
16169        __struct.rollspeed = buf.get_f32_le();
16170        __struct.pitchspeed = buf.get_f32_le();
16171        __struct.yawspeed = buf.get_f32_le();
16172        __struct.lat = buf.get_i32_le();
16173        __struct.lon = buf.get_i32_le();
16174        __struct.alt = buf.get_i32_le();
16175        __struct.vx = buf.get_i16_le();
16176        __struct.vy = buf.get_i16_le();
16177        __struct.vz = buf.get_i16_le();
16178        __struct.xacc = buf.get_i16_le();
16179        __struct.yacc = buf.get_i16_le();
16180        __struct.zacc = buf.get_i16_le();
16181        Ok(__struct)
16182    }
16183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16184        let mut __tmp = BytesMut::new(bytes);
16185        #[allow(clippy::absurd_extreme_comparisons)]
16186        #[allow(unused_comparisons)]
16187        if __tmp.remaining() < Self::ENCODED_LEN {
16188            panic!(
16189                "buffer is too small (need {} bytes, but got {})",
16190                Self::ENCODED_LEN,
16191                __tmp.remaining(),
16192            )
16193        }
16194        __tmp.put_u64_le(self.time_usec);
16195        __tmp.put_f32_le(self.roll);
16196        __tmp.put_f32_le(self.pitch);
16197        __tmp.put_f32_le(self.yaw);
16198        __tmp.put_f32_le(self.rollspeed);
16199        __tmp.put_f32_le(self.pitchspeed);
16200        __tmp.put_f32_le(self.yawspeed);
16201        __tmp.put_i32_le(self.lat);
16202        __tmp.put_i32_le(self.lon);
16203        __tmp.put_i32_le(self.alt);
16204        __tmp.put_i16_le(self.vx);
16205        __tmp.put_i16_le(self.vy);
16206        __tmp.put_i16_le(self.vz);
16207        __tmp.put_i16_le(self.xacc);
16208        __tmp.put_i16_le(self.yacc);
16209        __tmp.put_i16_le(self.zacc);
16210        if matches!(version, MavlinkVersion::V2) {
16211            let len = __tmp.len();
16212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16213        } else {
16214            __tmp.len()
16215        }
16216    }
16217}
16218#[doc = "id: 115"]
16219#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
16220#[derive(Debug, Clone, PartialEq)]
16221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16223pub struct HIL_STATE_QUATERNION_DATA {
16224    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16225    pub time_usec: u64,
16226    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
16227    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16228    pub attitude_quaternion: [f32; 4],
16229    #[doc = "Body frame roll / phi angular speed"]
16230    pub rollspeed: f32,
16231    #[doc = "Body frame pitch / theta angular speed"]
16232    pub pitchspeed: f32,
16233    #[doc = "Body frame yaw / psi angular speed"]
16234    pub yawspeed: f32,
16235    #[doc = "Latitude"]
16236    pub lat: i32,
16237    #[doc = "Longitude"]
16238    pub lon: i32,
16239    #[doc = "Altitude"]
16240    pub alt: i32,
16241    #[doc = "Ground X Speed (Latitude)"]
16242    pub vx: i16,
16243    #[doc = "Ground Y Speed (Longitude)"]
16244    pub vy: i16,
16245    #[doc = "Ground Z Speed (Altitude)"]
16246    pub vz: i16,
16247    #[doc = "Indicated airspeed"]
16248    pub ind_airspeed: u16,
16249    #[doc = "True airspeed"]
16250    pub true_airspeed: u16,
16251    #[doc = "X acceleration"]
16252    pub xacc: i16,
16253    #[doc = "Y acceleration"]
16254    pub yacc: i16,
16255    #[doc = "Z acceleration"]
16256    pub zacc: i16,
16257}
16258impl HIL_STATE_QUATERNION_DATA {
16259    pub const ENCODED_LEN: usize = 64usize;
16260    pub const DEFAULT: Self = Self {
16261        time_usec: 0_u64,
16262        attitude_quaternion: [0.0_f32; 4usize],
16263        rollspeed: 0.0_f32,
16264        pitchspeed: 0.0_f32,
16265        yawspeed: 0.0_f32,
16266        lat: 0_i32,
16267        lon: 0_i32,
16268        alt: 0_i32,
16269        vx: 0_i16,
16270        vy: 0_i16,
16271        vz: 0_i16,
16272        ind_airspeed: 0_u16,
16273        true_airspeed: 0_u16,
16274        xacc: 0_i16,
16275        yacc: 0_i16,
16276        zacc: 0_i16,
16277    };
16278    #[cfg(feature = "arbitrary")]
16279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16280        use arbitrary::{Arbitrary, Unstructured};
16281        let mut buf = [0u8; 1024];
16282        rng.fill_bytes(&mut buf);
16283        let mut unstructured = Unstructured::new(&buf);
16284        Self::arbitrary(&mut unstructured).unwrap_or_default()
16285    }
16286}
16287impl Default for HIL_STATE_QUATERNION_DATA {
16288    fn default() -> Self {
16289        Self::DEFAULT.clone()
16290    }
16291}
16292impl MessageData for HIL_STATE_QUATERNION_DATA {
16293    type Message = MavMessage;
16294    const ID: u32 = 115u32;
16295    const NAME: &'static str = "HIL_STATE_QUATERNION";
16296    const EXTRA_CRC: u8 = 4u8;
16297    const ENCODED_LEN: usize = 64usize;
16298    fn deser(
16299        _version: MavlinkVersion,
16300        __input: &[u8],
16301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16302        let avail_len = __input.len();
16303        let mut payload_buf = [0; Self::ENCODED_LEN];
16304        let mut buf = if avail_len < Self::ENCODED_LEN {
16305            payload_buf[0..avail_len].copy_from_slice(__input);
16306            Bytes::new(&payload_buf)
16307        } else {
16308            Bytes::new(__input)
16309        };
16310        let mut __struct = Self::default();
16311        __struct.time_usec = buf.get_u64_le();
16312        for v in &mut __struct.attitude_quaternion {
16313            let val = buf.get_f32_le();
16314            *v = val;
16315        }
16316        __struct.rollspeed = buf.get_f32_le();
16317        __struct.pitchspeed = buf.get_f32_le();
16318        __struct.yawspeed = buf.get_f32_le();
16319        __struct.lat = buf.get_i32_le();
16320        __struct.lon = buf.get_i32_le();
16321        __struct.alt = buf.get_i32_le();
16322        __struct.vx = buf.get_i16_le();
16323        __struct.vy = buf.get_i16_le();
16324        __struct.vz = buf.get_i16_le();
16325        __struct.ind_airspeed = buf.get_u16_le();
16326        __struct.true_airspeed = buf.get_u16_le();
16327        __struct.xacc = buf.get_i16_le();
16328        __struct.yacc = buf.get_i16_le();
16329        __struct.zacc = buf.get_i16_le();
16330        Ok(__struct)
16331    }
16332    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16333        let mut __tmp = BytesMut::new(bytes);
16334        #[allow(clippy::absurd_extreme_comparisons)]
16335        #[allow(unused_comparisons)]
16336        if __tmp.remaining() < Self::ENCODED_LEN {
16337            panic!(
16338                "buffer is too small (need {} bytes, but got {})",
16339                Self::ENCODED_LEN,
16340                __tmp.remaining(),
16341            )
16342        }
16343        __tmp.put_u64_le(self.time_usec);
16344        for val in &self.attitude_quaternion {
16345            __tmp.put_f32_le(*val);
16346        }
16347        __tmp.put_f32_le(self.rollspeed);
16348        __tmp.put_f32_le(self.pitchspeed);
16349        __tmp.put_f32_le(self.yawspeed);
16350        __tmp.put_i32_le(self.lat);
16351        __tmp.put_i32_le(self.lon);
16352        __tmp.put_i32_le(self.alt);
16353        __tmp.put_i16_le(self.vx);
16354        __tmp.put_i16_le(self.vy);
16355        __tmp.put_i16_le(self.vz);
16356        __tmp.put_u16_le(self.ind_airspeed);
16357        __tmp.put_u16_le(self.true_airspeed);
16358        __tmp.put_i16_le(self.xacc);
16359        __tmp.put_i16_le(self.yacc);
16360        __tmp.put_i16_le(self.zacc);
16361        if matches!(version, MavlinkVersion::V2) {
16362            let len = __tmp.len();
16363            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16364        } else {
16365            __tmp.len()
16366        }
16367    }
16368}
16369#[doc = "id: 242"]
16370#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16371#[derive(Debug, Clone, PartialEq)]
16372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16374pub struct HOME_POSITION_DATA {
16375    #[doc = "Latitude (WGS84)"]
16376    pub latitude: i32,
16377    #[doc = "Longitude (WGS84)"]
16378    pub longitude: i32,
16379    #[doc = "Altitude (MSL). Positive for up."]
16380    pub altitude: i32,
16381    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16382    pub x: f32,
16383    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16384    pub y: f32,
16385    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16386    pub z: f32,
16387    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16388    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16389    pub q: [f32; 4],
16390    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16391    pub approach_x: f32,
16392    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16393    pub approach_y: f32,
16394    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16395    pub approach_z: f32,
16396    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16397    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16398    pub time_usec: u64,
16399}
16400impl HOME_POSITION_DATA {
16401    pub const ENCODED_LEN: usize = 60usize;
16402    pub const DEFAULT: Self = Self {
16403        latitude: 0_i32,
16404        longitude: 0_i32,
16405        altitude: 0_i32,
16406        x: 0.0_f32,
16407        y: 0.0_f32,
16408        z: 0.0_f32,
16409        q: [0.0_f32; 4usize],
16410        approach_x: 0.0_f32,
16411        approach_y: 0.0_f32,
16412        approach_z: 0.0_f32,
16413        time_usec: 0_u64,
16414    };
16415    #[cfg(feature = "arbitrary")]
16416    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16417        use arbitrary::{Arbitrary, Unstructured};
16418        let mut buf = [0u8; 1024];
16419        rng.fill_bytes(&mut buf);
16420        let mut unstructured = Unstructured::new(&buf);
16421        Self::arbitrary(&mut unstructured).unwrap_or_default()
16422    }
16423}
16424impl Default for HOME_POSITION_DATA {
16425    fn default() -> Self {
16426        Self::DEFAULT.clone()
16427    }
16428}
16429impl MessageData for HOME_POSITION_DATA {
16430    type Message = MavMessage;
16431    const ID: u32 = 242u32;
16432    const NAME: &'static str = "HOME_POSITION";
16433    const EXTRA_CRC: u8 = 104u8;
16434    const ENCODED_LEN: usize = 60usize;
16435    fn deser(
16436        _version: MavlinkVersion,
16437        __input: &[u8],
16438    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16439        let avail_len = __input.len();
16440        let mut payload_buf = [0; Self::ENCODED_LEN];
16441        let mut buf = if avail_len < Self::ENCODED_LEN {
16442            payload_buf[0..avail_len].copy_from_slice(__input);
16443            Bytes::new(&payload_buf)
16444        } else {
16445            Bytes::new(__input)
16446        };
16447        let mut __struct = Self::default();
16448        __struct.latitude = buf.get_i32_le();
16449        __struct.longitude = buf.get_i32_le();
16450        __struct.altitude = buf.get_i32_le();
16451        __struct.x = buf.get_f32_le();
16452        __struct.y = buf.get_f32_le();
16453        __struct.z = buf.get_f32_le();
16454        for v in &mut __struct.q {
16455            let val = buf.get_f32_le();
16456            *v = val;
16457        }
16458        __struct.approach_x = buf.get_f32_le();
16459        __struct.approach_y = buf.get_f32_le();
16460        __struct.approach_z = buf.get_f32_le();
16461        __struct.time_usec = buf.get_u64_le();
16462        Ok(__struct)
16463    }
16464    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16465        let mut __tmp = BytesMut::new(bytes);
16466        #[allow(clippy::absurd_extreme_comparisons)]
16467        #[allow(unused_comparisons)]
16468        if __tmp.remaining() < Self::ENCODED_LEN {
16469            panic!(
16470                "buffer is too small (need {} bytes, but got {})",
16471                Self::ENCODED_LEN,
16472                __tmp.remaining(),
16473            )
16474        }
16475        __tmp.put_i32_le(self.latitude);
16476        __tmp.put_i32_le(self.longitude);
16477        __tmp.put_i32_le(self.altitude);
16478        __tmp.put_f32_le(self.x);
16479        __tmp.put_f32_le(self.y);
16480        __tmp.put_f32_le(self.z);
16481        for val in &self.q {
16482            __tmp.put_f32_le(*val);
16483        }
16484        __tmp.put_f32_le(self.approach_x);
16485        __tmp.put_f32_le(self.approach_y);
16486        __tmp.put_f32_le(self.approach_z);
16487        __tmp.put_u64_le(self.time_usec);
16488        if matches!(version, MavlinkVersion::V2) {
16489            let len = __tmp.len();
16490            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16491        } else {
16492            __tmp.len()
16493        }
16494    }
16495}
16496#[doc = "id: 12920"]
16497#[doc = "Temperature and humidity from hygrometer."]
16498#[derive(Debug, Clone, PartialEq)]
16499#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16500#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16501pub struct HYGROMETER_SENSOR_DATA {
16502    #[doc = "Temperature"]
16503    pub temperature: i16,
16504    #[doc = "Humidity"]
16505    pub humidity: u16,
16506    #[doc = "Hygrometer ID"]
16507    pub id: u8,
16508}
16509impl HYGROMETER_SENSOR_DATA {
16510    pub const ENCODED_LEN: usize = 5usize;
16511    pub const DEFAULT: Self = Self {
16512        temperature: 0_i16,
16513        humidity: 0_u16,
16514        id: 0_u8,
16515    };
16516    #[cfg(feature = "arbitrary")]
16517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16518        use arbitrary::{Arbitrary, Unstructured};
16519        let mut buf = [0u8; 1024];
16520        rng.fill_bytes(&mut buf);
16521        let mut unstructured = Unstructured::new(&buf);
16522        Self::arbitrary(&mut unstructured).unwrap_or_default()
16523    }
16524}
16525impl Default for HYGROMETER_SENSOR_DATA {
16526    fn default() -> Self {
16527        Self::DEFAULT.clone()
16528    }
16529}
16530impl MessageData for HYGROMETER_SENSOR_DATA {
16531    type Message = MavMessage;
16532    const ID: u32 = 12920u32;
16533    const NAME: &'static str = "HYGROMETER_SENSOR";
16534    const EXTRA_CRC: u8 = 20u8;
16535    const ENCODED_LEN: usize = 5usize;
16536    fn deser(
16537        _version: MavlinkVersion,
16538        __input: &[u8],
16539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16540        let avail_len = __input.len();
16541        let mut payload_buf = [0; Self::ENCODED_LEN];
16542        let mut buf = if avail_len < Self::ENCODED_LEN {
16543            payload_buf[0..avail_len].copy_from_slice(__input);
16544            Bytes::new(&payload_buf)
16545        } else {
16546            Bytes::new(__input)
16547        };
16548        let mut __struct = Self::default();
16549        __struct.temperature = buf.get_i16_le();
16550        __struct.humidity = buf.get_u16_le();
16551        __struct.id = buf.get_u8();
16552        Ok(__struct)
16553    }
16554    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16555        let mut __tmp = BytesMut::new(bytes);
16556        #[allow(clippy::absurd_extreme_comparisons)]
16557        #[allow(unused_comparisons)]
16558        if __tmp.remaining() < Self::ENCODED_LEN {
16559            panic!(
16560                "buffer is too small (need {} bytes, but got {})",
16561                Self::ENCODED_LEN,
16562                __tmp.remaining(),
16563            )
16564        }
16565        __tmp.put_i16_le(self.temperature);
16566        __tmp.put_u16_le(self.humidity);
16567        __tmp.put_u8(self.id);
16568        if matches!(version, MavlinkVersion::V2) {
16569            let len = __tmp.len();
16570            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16571        } else {
16572            __tmp.len()
16573        }
16574    }
16575}
16576#[doc = "id: 440"]
16577#[doc = "Illuminator status."]
16578#[derive(Debug, Clone, PartialEq)]
16579#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16580#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16581pub struct ILLUMINATOR_STATUS_DATA {
16582    #[doc = "Time since the start-up of the illuminator in ms"]
16583    pub uptime_ms: u32,
16584    #[doc = "Errors"]
16585    pub error_status: IlluminatorErrorFlags,
16586    #[doc = "Illuminator brightness"]
16587    pub brightness: f32,
16588    #[doc = "Illuminator strobing period in seconds"]
16589    pub strobe_period: f32,
16590    #[doc = "Illuminator strobing duty cycle"]
16591    pub strobe_duty_cycle: f32,
16592    #[doc = "Temperature in Celsius"]
16593    pub temp_c: f32,
16594    #[doc = "Minimum strobing period in seconds"]
16595    pub min_strobe_period: f32,
16596    #[doc = "Maximum strobing period in seconds"]
16597    pub max_strobe_period: f32,
16598    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16599    pub enable: u8,
16600    #[doc = "Supported illuminator modes"]
16601    pub mode_bitmask: IlluminatorMode,
16602    #[doc = "Illuminator mode"]
16603    pub mode: IlluminatorMode,
16604}
16605impl ILLUMINATOR_STATUS_DATA {
16606    pub const ENCODED_LEN: usize = 35usize;
16607    pub const DEFAULT: Self = Self {
16608        uptime_ms: 0_u32,
16609        error_status: IlluminatorErrorFlags::DEFAULT,
16610        brightness: 0.0_f32,
16611        strobe_period: 0.0_f32,
16612        strobe_duty_cycle: 0.0_f32,
16613        temp_c: 0.0_f32,
16614        min_strobe_period: 0.0_f32,
16615        max_strobe_period: 0.0_f32,
16616        enable: 0_u8,
16617        mode_bitmask: IlluminatorMode::DEFAULT,
16618        mode: IlluminatorMode::DEFAULT,
16619    };
16620    #[cfg(feature = "arbitrary")]
16621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16622        use arbitrary::{Arbitrary, Unstructured};
16623        let mut buf = [0u8; 1024];
16624        rng.fill_bytes(&mut buf);
16625        let mut unstructured = Unstructured::new(&buf);
16626        Self::arbitrary(&mut unstructured).unwrap_or_default()
16627    }
16628}
16629impl Default for ILLUMINATOR_STATUS_DATA {
16630    fn default() -> Self {
16631        Self::DEFAULT.clone()
16632    }
16633}
16634impl MessageData for ILLUMINATOR_STATUS_DATA {
16635    type Message = MavMessage;
16636    const ID: u32 = 440u32;
16637    const NAME: &'static str = "ILLUMINATOR_STATUS";
16638    const EXTRA_CRC: u8 = 66u8;
16639    const ENCODED_LEN: usize = 35usize;
16640    fn deser(
16641        _version: MavlinkVersion,
16642        __input: &[u8],
16643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16644        let avail_len = __input.len();
16645        let mut payload_buf = [0; Self::ENCODED_LEN];
16646        let mut buf = if avail_len < Self::ENCODED_LEN {
16647            payload_buf[0..avail_len].copy_from_slice(__input);
16648            Bytes::new(&payload_buf)
16649        } else {
16650            Bytes::new(__input)
16651        };
16652        let mut __struct = Self::default();
16653        __struct.uptime_ms = buf.get_u32_le();
16654        let tmp = buf.get_u32_le();
16655        __struct.error_status = IlluminatorErrorFlags::from_bits(
16656            tmp & IlluminatorErrorFlags::all().bits(),
16657        )
16658        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16659            flag_type: "IlluminatorErrorFlags",
16660            value: tmp as u32,
16661        })?;
16662        __struct.brightness = buf.get_f32_le();
16663        __struct.strobe_period = buf.get_f32_le();
16664        __struct.strobe_duty_cycle = buf.get_f32_le();
16665        __struct.temp_c = buf.get_f32_le();
16666        __struct.min_strobe_period = buf.get_f32_le();
16667        __struct.max_strobe_period = buf.get_f32_le();
16668        __struct.enable = buf.get_u8();
16669        let tmp = buf.get_u8();
16670        __struct.mode_bitmask =
16671            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16672                enum_type: "IlluminatorMode",
16673                value: tmp as u32,
16674            })?;
16675        let tmp = buf.get_u8();
16676        __struct.mode =
16677            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16678                enum_type: "IlluminatorMode",
16679                value: tmp as u32,
16680            })?;
16681        Ok(__struct)
16682    }
16683    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16684        let mut __tmp = BytesMut::new(bytes);
16685        #[allow(clippy::absurd_extreme_comparisons)]
16686        #[allow(unused_comparisons)]
16687        if __tmp.remaining() < Self::ENCODED_LEN {
16688            panic!(
16689                "buffer is too small (need {} bytes, but got {})",
16690                Self::ENCODED_LEN,
16691                __tmp.remaining(),
16692            )
16693        }
16694        __tmp.put_u32_le(self.uptime_ms);
16695        __tmp.put_u32_le(self.error_status.bits());
16696        __tmp.put_f32_le(self.brightness);
16697        __tmp.put_f32_le(self.strobe_period);
16698        __tmp.put_f32_le(self.strobe_duty_cycle);
16699        __tmp.put_f32_le(self.temp_c);
16700        __tmp.put_f32_le(self.min_strobe_period);
16701        __tmp.put_f32_le(self.max_strobe_period);
16702        __tmp.put_u8(self.enable);
16703        __tmp.put_u8(self.mode_bitmask as u8);
16704        __tmp.put_u8(self.mode as u8);
16705        if matches!(version, MavlinkVersion::V2) {
16706            let len = __tmp.len();
16707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16708        } else {
16709            __tmp.len()
16710        }
16711    }
16712}
16713#[doc = "id: 335"]
16714#[doc = "Status of the Iridium SBD link."]
16715#[derive(Debug, Clone, PartialEq)]
16716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16718pub struct ISBD_LINK_STATUS_DATA {
16719    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16720    pub timestamp: u64,
16721    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16722    pub last_heartbeat: u64,
16723    #[doc = "Number of failed SBD sessions."]
16724    pub failed_sessions: u16,
16725    #[doc = "Number of successful SBD sessions."]
16726    pub successful_sessions: u16,
16727    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16728    pub signal_quality: u8,
16729    #[doc = "1: Ring call pending, 0: No call pending."]
16730    pub ring_pending: u8,
16731    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16732    pub tx_session_pending: u8,
16733    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16734    pub rx_session_pending: u8,
16735}
16736impl ISBD_LINK_STATUS_DATA {
16737    pub const ENCODED_LEN: usize = 24usize;
16738    pub const DEFAULT: Self = Self {
16739        timestamp: 0_u64,
16740        last_heartbeat: 0_u64,
16741        failed_sessions: 0_u16,
16742        successful_sessions: 0_u16,
16743        signal_quality: 0_u8,
16744        ring_pending: 0_u8,
16745        tx_session_pending: 0_u8,
16746        rx_session_pending: 0_u8,
16747    };
16748    #[cfg(feature = "arbitrary")]
16749    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16750        use arbitrary::{Arbitrary, Unstructured};
16751        let mut buf = [0u8; 1024];
16752        rng.fill_bytes(&mut buf);
16753        let mut unstructured = Unstructured::new(&buf);
16754        Self::arbitrary(&mut unstructured).unwrap_or_default()
16755    }
16756}
16757impl Default for ISBD_LINK_STATUS_DATA {
16758    fn default() -> Self {
16759        Self::DEFAULT.clone()
16760    }
16761}
16762impl MessageData for ISBD_LINK_STATUS_DATA {
16763    type Message = MavMessage;
16764    const ID: u32 = 335u32;
16765    const NAME: &'static str = "ISBD_LINK_STATUS";
16766    const EXTRA_CRC: u8 = 225u8;
16767    const ENCODED_LEN: usize = 24usize;
16768    fn deser(
16769        _version: MavlinkVersion,
16770        __input: &[u8],
16771    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16772        let avail_len = __input.len();
16773        let mut payload_buf = [0; Self::ENCODED_LEN];
16774        let mut buf = if avail_len < Self::ENCODED_LEN {
16775            payload_buf[0..avail_len].copy_from_slice(__input);
16776            Bytes::new(&payload_buf)
16777        } else {
16778            Bytes::new(__input)
16779        };
16780        let mut __struct = Self::default();
16781        __struct.timestamp = buf.get_u64_le();
16782        __struct.last_heartbeat = buf.get_u64_le();
16783        __struct.failed_sessions = buf.get_u16_le();
16784        __struct.successful_sessions = buf.get_u16_le();
16785        __struct.signal_quality = buf.get_u8();
16786        __struct.ring_pending = buf.get_u8();
16787        __struct.tx_session_pending = buf.get_u8();
16788        __struct.rx_session_pending = buf.get_u8();
16789        Ok(__struct)
16790    }
16791    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16792        let mut __tmp = BytesMut::new(bytes);
16793        #[allow(clippy::absurd_extreme_comparisons)]
16794        #[allow(unused_comparisons)]
16795        if __tmp.remaining() < Self::ENCODED_LEN {
16796            panic!(
16797                "buffer is too small (need {} bytes, but got {})",
16798                Self::ENCODED_LEN,
16799                __tmp.remaining(),
16800            )
16801        }
16802        __tmp.put_u64_le(self.timestamp);
16803        __tmp.put_u64_le(self.last_heartbeat);
16804        __tmp.put_u16_le(self.failed_sessions);
16805        __tmp.put_u16_le(self.successful_sessions);
16806        __tmp.put_u8(self.signal_quality);
16807        __tmp.put_u8(self.ring_pending);
16808        __tmp.put_u8(self.tx_session_pending);
16809        __tmp.put_u8(self.rx_session_pending);
16810        if matches!(version, MavlinkVersion::V2) {
16811            let len = __tmp.len();
16812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16813        } else {
16814            __tmp.len()
16815        }
16816    }
16817}
16818#[doc = "id: 149"]
16819#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
16820#[derive(Debug, Clone, PartialEq)]
16821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16823pub struct LANDING_TARGET_DATA {
16824    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16825    pub time_usec: u64,
16826    #[doc = "X-axis angular offset of the target from the center of the image"]
16827    pub angle_x: f32,
16828    #[doc = "Y-axis angular offset of the target from the center of the image"]
16829    pub angle_y: f32,
16830    #[doc = "Distance to the target from the vehicle"]
16831    pub distance: f32,
16832    #[doc = "Size of target along x-axis"]
16833    pub size_x: f32,
16834    #[doc = "Size of target along y-axis"]
16835    pub size_y: f32,
16836    #[doc = "The ID of the target if multiple targets are present"]
16837    pub target_num: u8,
16838    #[doc = "Coordinate frame used for following fields."]
16839    pub frame: MavFrame,
16840    #[doc = "X Position of the landing target in MAV_FRAME"]
16841    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16842    pub x: f32,
16843    #[doc = "Y Position of the landing target in MAV_FRAME"]
16844    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16845    pub y: f32,
16846    #[doc = "Z Position of the landing target in MAV_FRAME"]
16847    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16848    pub z: f32,
16849    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
16850    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16852    pub q: [f32; 4],
16853    #[doc = "Type of landing target"]
16854    #[cfg_attr(feature = "serde", serde(default))]
16855    pub mavtype: LandingTargetType,
16856    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
16857    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16858    pub position_valid: u8,
16859}
16860impl LANDING_TARGET_DATA {
16861    pub const ENCODED_LEN: usize = 60usize;
16862    pub const DEFAULT: Self = Self {
16863        time_usec: 0_u64,
16864        angle_x: 0.0_f32,
16865        angle_y: 0.0_f32,
16866        distance: 0.0_f32,
16867        size_x: 0.0_f32,
16868        size_y: 0.0_f32,
16869        target_num: 0_u8,
16870        frame: MavFrame::DEFAULT,
16871        x: 0.0_f32,
16872        y: 0.0_f32,
16873        z: 0.0_f32,
16874        q: [0.0_f32; 4usize],
16875        mavtype: LandingTargetType::DEFAULT,
16876        position_valid: 0_u8,
16877    };
16878    #[cfg(feature = "arbitrary")]
16879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16880        use arbitrary::{Arbitrary, Unstructured};
16881        let mut buf = [0u8; 1024];
16882        rng.fill_bytes(&mut buf);
16883        let mut unstructured = Unstructured::new(&buf);
16884        Self::arbitrary(&mut unstructured).unwrap_or_default()
16885    }
16886}
16887impl Default for LANDING_TARGET_DATA {
16888    fn default() -> Self {
16889        Self::DEFAULT.clone()
16890    }
16891}
16892impl MessageData for LANDING_TARGET_DATA {
16893    type Message = MavMessage;
16894    const ID: u32 = 149u32;
16895    const NAME: &'static str = "LANDING_TARGET";
16896    const EXTRA_CRC: u8 = 200u8;
16897    const ENCODED_LEN: usize = 60usize;
16898    fn deser(
16899        _version: MavlinkVersion,
16900        __input: &[u8],
16901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16902        let avail_len = __input.len();
16903        let mut payload_buf = [0; Self::ENCODED_LEN];
16904        let mut buf = if avail_len < Self::ENCODED_LEN {
16905            payload_buf[0..avail_len].copy_from_slice(__input);
16906            Bytes::new(&payload_buf)
16907        } else {
16908            Bytes::new(__input)
16909        };
16910        let mut __struct = Self::default();
16911        __struct.time_usec = buf.get_u64_le();
16912        __struct.angle_x = buf.get_f32_le();
16913        __struct.angle_y = buf.get_f32_le();
16914        __struct.distance = buf.get_f32_le();
16915        __struct.size_x = buf.get_f32_le();
16916        __struct.size_y = buf.get_f32_le();
16917        __struct.target_num = buf.get_u8();
16918        let tmp = buf.get_u8();
16919        __struct.frame =
16920            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16921                enum_type: "MavFrame",
16922                value: tmp as u32,
16923            })?;
16924        __struct.x = buf.get_f32_le();
16925        __struct.y = buf.get_f32_le();
16926        __struct.z = buf.get_f32_le();
16927        for v in &mut __struct.q {
16928            let val = buf.get_f32_le();
16929            *v = val;
16930        }
16931        let tmp = buf.get_u8();
16932        __struct.mavtype =
16933            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16934                enum_type: "LandingTargetType",
16935                value: tmp as u32,
16936            })?;
16937        __struct.position_valid = buf.get_u8();
16938        Ok(__struct)
16939    }
16940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16941        let mut __tmp = BytesMut::new(bytes);
16942        #[allow(clippy::absurd_extreme_comparisons)]
16943        #[allow(unused_comparisons)]
16944        if __tmp.remaining() < Self::ENCODED_LEN {
16945            panic!(
16946                "buffer is too small (need {} bytes, but got {})",
16947                Self::ENCODED_LEN,
16948                __tmp.remaining(),
16949            )
16950        }
16951        __tmp.put_u64_le(self.time_usec);
16952        __tmp.put_f32_le(self.angle_x);
16953        __tmp.put_f32_le(self.angle_y);
16954        __tmp.put_f32_le(self.distance);
16955        __tmp.put_f32_le(self.size_x);
16956        __tmp.put_f32_le(self.size_y);
16957        __tmp.put_u8(self.target_num);
16958        __tmp.put_u8(self.frame as u8);
16959        __tmp.put_f32_le(self.x);
16960        __tmp.put_f32_le(self.y);
16961        __tmp.put_f32_le(self.z);
16962        for val in &self.q {
16963            __tmp.put_f32_le(*val);
16964        }
16965        __tmp.put_u8(self.mavtype as u8);
16966        __tmp.put_u8(self.position_valid);
16967        if matches!(version, MavlinkVersion::V2) {
16968            let len = __tmp.len();
16969            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16970        } else {
16971            __tmp.len()
16972        }
16973    }
16974}
16975#[doc = "id: 8"]
16976#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
16977#[derive(Debug, Clone, PartialEq)]
16978#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16979#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16980pub struct LINK_NODE_STATUS_DATA {
16981    #[doc = "Timestamp (time since system boot)."]
16982    pub timestamp: u64,
16983    #[doc = "Transmit rate"]
16984    pub tx_rate: u32,
16985    #[doc = "Receive rate"]
16986    pub rx_rate: u32,
16987    #[doc = "Messages sent"]
16988    pub messages_sent: u32,
16989    #[doc = "Messages received (estimated from counting seq)"]
16990    pub messages_received: u32,
16991    #[doc = "Messages lost (estimated from counting seq)"]
16992    pub messages_lost: u32,
16993    #[doc = "Number of bytes that could not be parsed correctly."]
16994    pub rx_parse_err: u16,
16995    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
16996    pub tx_overflows: u16,
16997    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
16998    pub rx_overflows: u16,
16999    #[doc = "Remaining free transmit buffer space"]
17000    pub tx_buf: u8,
17001    #[doc = "Remaining free receive buffer space"]
17002    pub rx_buf: u8,
17003}
17004impl LINK_NODE_STATUS_DATA {
17005    pub const ENCODED_LEN: usize = 36usize;
17006    pub const DEFAULT: Self = Self {
17007        timestamp: 0_u64,
17008        tx_rate: 0_u32,
17009        rx_rate: 0_u32,
17010        messages_sent: 0_u32,
17011        messages_received: 0_u32,
17012        messages_lost: 0_u32,
17013        rx_parse_err: 0_u16,
17014        tx_overflows: 0_u16,
17015        rx_overflows: 0_u16,
17016        tx_buf: 0_u8,
17017        rx_buf: 0_u8,
17018    };
17019    #[cfg(feature = "arbitrary")]
17020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17021        use arbitrary::{Arbitrary, Unstructured};
17022        let mut buf = [0u8; 1024];
17023        rng.fill_bytes(&mut buf);
17024        let mut unstructured = Unstructured::new(&buf);
17025        Self::arbitrary(&mut unstructured).unwrap_or_default()
17026    }
17027}
17028impl Default for LINK_NODE_STATUS_DATA {
17029    fn default() -> Self {
17030        Self::DEFAULT.clone()
17031    }
17032}
17033impl MessageData for LINK_NODE_STATUS_DATA {
17034    type Message = MavMessage;
17035    const ID: u32 = 8u32;
17036    const NAME: &'static str = "LINK_NODE_STATUS";
17037    const EXTRA_CRC: u8 = 117u8;
17038    const ENCODED_LEN: usize = 36usize;
17039    fn deser(
17040        _version: MavlinkVersion,
17041        __input: &[u8],
17042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17043        let avail_len = __input.len();
17044        let mut payload_buf = [0; Self::ENCODED_LEN];
17045        let mut buf = if avail_len < Self::ENCODED_LEN {
17046            payload_buf[0..avail_len].copy_from_slice(__input);
17047            Bytes::new(&payload_buf)
17048        } else {
17049            Bytes::new(__input)
17050        };
17051        let mut __struct = Self::default();
17052        __struct.timestamp = buf.get_u64_le();
17053        __struct.tx_rate = buf.get_u32_le();
17054        __struct.rx_rate = buf.get_u32_le();
17055        __struct.messages_sent = buf.get_u32_le();
17056        __struct.messages_received = buf.get_u32_le();
17057        __struct.messages_lost = buf.get_u32_le();
17058        __struct.rx_parse_err = buf.get_u16_le();
17059        __struct.tx_overflows = buf.get_u16_le();
17060        __struct.rx_overflows = buf.get_u16_le();
17061        __struct.tx_buf = buf.get_u8();
17062        __struct.rx_buf = buf.get_u8();
17063        Ok(__struct)
17064    }
17065    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17066        let mut __tmp = BytesMut::new(bytes);
17067        #[allow(clippy::absurd_extreme_comparisons)]
17068        #[allow(unused_comparisons)]
17069        if __tmp.remaining() < Self::ENCODED_LEN {
17070            panic!(
17071                "buffer is too small (need {} bytes, but got {})",
17072                Self::ENCODED_LEN,
17073                __tmp.remaining(),
17074            )
17075        }
17076        __tmp.put_u64_le(self.timestamp);
17077        __tmp.put_u32_le(self.tx_rate);
17078        __tmp.put_u32_le(self.rx_rate);
17079        __tmp.put_u32_le(self.messages_sent);
17080        __tmp.put_u32_le(self.messages_received);
17081        __tmp.put_u32_le(self.messages_lost);
17082        __tmp.put_u16_le(self.rx_parse_err);
17083        __tmp.put_u16_le(self.tx_overflows);
17084        __tmp.put_u16_le(self.rx_overflows);
17085        __tmp.put_u8(self.tx_buf);
17086        __tmp.put_u8(self.rx_buf);
17087        if matches!(version, MavlinkVersion::V2) {
17088            let len = __tmp.len();
17089            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17090        } else {
17091            __tmp.len()
17092        }
17093    }
17094}
17095#[doc = "id: 32"]
17096#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17097#[derive(Debug, Clone, PartialEq)]
17098#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17099#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17100pub struct LOCAL_POSITION_NED_DATA {
17101    #[doc = "Timestamp (time since system boot)."]
17102    pub time_boot_ms: u32,
17103    #[doc = "X Position"]
17104    pub x: f32,
17105    #[doc = "Y Position"]
17106    pub y: f32,
17107    #[doc = "Z Position"]
17108    pub z: f32,
17109    #[doc = "X Speed"]
17110    pub vx: f32,
17111    #[doc = "Y Speed"]
17112    pub vy: f32,
17113    #[doc = "Z Speed"]
17114    pub vz: f32,
17115}
17116impl LOCAL_POSITION_NED_DATA {
17117    pub const ENCODED_LEN: usize = 28usize;
17118    pub const DEFAULT: Self = Self {
17119        time_boot_ms: 0_u32,
17120        x: 0.0_f32,
17121        y: 0.0_f32,
17122        z: 0.0_f32,
17123        vx: 0.0_f32,
17124        vy: 0.0_f32,
17125        vz: 0.0_f32,
17126    };
17127    #[cfg(feature = "arbitrary")]
17128    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17129        use arbitrary::{Arbitrary, Unstructured};
17130        let mut buf = [0u8; 1024];
17131        rng.fill_bytes(&mut buf);
17132        let mut unstructured = Unstructured::new(&buf);
17133        Self::arbitrary(&mut unstructured).unwrap_or_default()
17134    }
17135}
17136impl Default for LOCAL_POSITION_NED_DATA {
17137    fn default() -> Self {
17138        Self::DEFAULT.clone()
17139    }
17140}
17141impl MessageData for LOCAL_POSITION_NED_DATA {
17142    type Message = MavMessage;
17143    const ID: u32 = 32u32;
17144    const NAME: &'static str = "LOCAL_POSITION_NED";
17145    const EXTRA_CRC: u8 = 185u8;
17146    const ENCODED_LEN: usize = 28usize;
17147    fn deser(
17148        _version: MavlinkVersion,
17149        __input: &[u8],
17150    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17151        let avail_len = __input.len();
17152        let mut payload_buf = [0; Self::ENCODED_LEN];
17153        let mut buf = if avail_len < Self::ENCODED_LEN {
17154            payload_buf[0..avail_len].copy_from_slice(__input);
17155            Bytes::new(&payload_buf)
17156        } else {
17157            Bytes::new(__input)
17158        };
17159        let mut __struct = Self::default();
17160        __struct.time_boot_ms = buf.get_u32_le();
17161        __struct.x = buf.get_f32_le();
17162        __struct.y = buf.get_f32_le();
17163        __struct.z = buf.get_f32_le();
17164        __struct.vx = buf.get_f32_le();
17165        __struct.vy = buf.get_f32_le();
17166        __struct.vz = buf.get_f32_le();
17167        Ok(__struct)
17168    }
17169    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17170        let mut __tmp = BytesMut::new(bytes);
17171        #[allow(clippy::absurd_extreme_comparisons)]
17172        #[allow(unused_comparisons)]
17173        if __tmp.remaining() < Self::ENCODED_LEN {
17174            panic!(
17175                "buffer is too small (need {} bytes, but got {})",
17176                Self::ENCODED_LEN,
17177                __tmp.remaining(),
17178            )
17179        }
17180        __tmp.put_u32_le(self.time_boot_ms);
17181        __tmp.put_f32_le(self.x);
17182        __tmp.put_f32_le(self.y);
17183        __tmp.put_f32_le(self.z);
17184        __tmp.put_f32_le(self.vx);
17185        __tmp.put_f32_le(self.vy);
17186        __tmp.put_f32_le(self.vz);
17187        if matches!(version, MavlinkVersion::V2) {
17188            let len = __tmp.len();
17189            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17190        } else {
17191            __tmp.len()
17192        }
17193    }
17194}
17195#[doc = "id: 64"]
17196#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17197#[derive(Debug, Clone, PartialEq)]
17198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17200pub struct LOCAL_POSITION_NED_COV_DATA {
17201    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
17202    pub time_usec: u64,
17203    #[doc = "X Position"]
17204    pub x: f32,
17205    #[doc = "Y Position"]
17206    pub y: f32,
17207    #[doc = "Z Position"]
17208    pub z: f32,
17209    #[doc = "X Speed"]
17210    pub vx: f32,
17211    #[doc = "Y Speed"]
17212    pub vy: f32,
17213    #[doc = "Z Speed"]
17214    pub vz: f32,
17215    #[doc = "X Acceleration"]
17216    pub ax: f32,
17217    #[doc = "Y Acceleration"]
17218    pub ay: f32,
17219    #[doc = "Z Acceleration"]
17220    pub az: f32,
17221    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
17222    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17223    pub covariance: [f32; 45],
17224    #[doc = "Class id of the estimator this estimate originated from."]
17225    pub estimator_type: MavEstimatorType,
17226}
17227impl LOCAL_POSITION_NED_COV_DATA {
17228    pub const ENCODED_LEN: usize = 225usize;
17229    pub const DEFAULT: Self = Self {
17230        time_usec: 0_u64,
17231        x: 0.0_f32,
17232        y: 0.0_f32,
17233        z: 0.0_f32,
17234        vx: 0.0_f32,
17235        vy: 0.0_f32,
17236        vz: 0.0_f32,
17237        ax: 0.0_f32,
17238        ay: 0.0_f32,
17239        az: 0.0_f32,
17240        covariance: [0.0_f32; 45usize],
17241        estimator_type: MavEstimatorType::DEFAULT,
17242    };
17243    #[cfg(feature = "arbitrary")]
17244    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17245        use arbitrary::{Arbitrary, Unstructured};
17246        let mut buf = [0u8; 1024];
17247        rng.fill_bytes(&mut buf);
17248        let mut unstructured = Unstructured::new(&buf);
17249        Self::arbitrary(&mut unstructured).unwrap_or_default()
17250    }
17251}
17252impl Default for LOCAL_POSITION_NED_COV_DATA {
17253    fn default() -> Self {
17254        Self::DEFAULT.clone()
17255    }
17256}
17257impl MessageData for LOCAL_POSITION_NED_COV_DATA {
17258    type Message = MavMessage;
17259    const ID: u32 = 64u32;
17260    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
17261    const EXTRA_CRC: u8 = 191u8;
17262    const ENCODED_LEN: usize = 225usize;
17263    fn deser(
17264        _version: MavlinkVersion,
17265        __input: &[u8],
17266    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17267        let avail_len = __input.len();
17268        let mut payload_buf = [0; Self::ENCODED_LEN];
17269        let mut buf = if avail_len < Self::ENCODED_LEN {
17270            payload_buf[0..avail_len].copy_from_slice(__input);
17271            Bytes::new(&payload_buf)
17272        } else {
17273            Bytes::new(__input)
17274        };
17275        let mut __struct = Self::default();
17276        __struct.time_usec = buf.get_u64_le();
17277        __struct.x = buf.get_f32_le();
17278        __struct.y = buf.get_f32_le();
17279        __struct.z = buf.get_f32_le();
17280        __struct.vx = buf.get_f32_le();
17281        __struct.vy = buf.get_f32_le();
17282        __struct.vz = buf.get_f32_le();
17283        __struct.ax = buf.get_f32_le();
17284        __struct.ay = buf.get_f32_le();
17285        __struct.az = buf.get_f32_le();
17286        for v in &mut __struct.covariance {
17287            let val = buf.get_f32_le();
17288            *v = val;
17289        }
17290        let tmp = buf.get_u8();
17291        __struct.estimator_type =
17292            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
17293                enum_type: "MavEstimatorType",
17294                value: tmp as u32,
17295            })?;
17296        Ok(__struct)
17297    }
17298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17299        let mut __tmp = BytesMut::new(bytes);
17300        #[allow(clippy::absurd_extreme_comparisons)]
17301        #[allow(unused_comparisons)]
17302        if __tmp.remaining() < Self::ENCODED_LEN {
17303            panic!(
17304                "buffer is too small (need {} bytes, but got {})",
17305                Self::ENCODED_LEN,
17306                __tmp.remaining(),
17307            )
17308        }
17309        __tmp.put_u64_le(self.time_usec);
17310        __tmp.put_f32_le(self.x);
17311        __tmp.put_f32_le(self.y);
17312        __tmp.put_f32_le(self.z);
17313        __tmp.put_f32_le(self.vx);
17314        __tmp.put_f32_le(self.vy);
17315        __tmp.put_f32_le(self.vz);
17316        __tmp.put_f32_le(self.ax);
17317        __tmp.put_f32_le(self.ay);
17318        __tmp.put_f32_le(self.az);
17319        for val in &self.covariance {
17320            __tmp.put_f32_le(*val);
17321        }
17322        __tmp.put_u8(self.estimator_type as u8);
17323        if matches!(version, MavlinkVersion::V2) {
17324            let len = __tmp.len();
17325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17326        } else {
17327            __tmp.len()
17328        }
17329    }
17330}
17331#[doc = "id: 89"]
17332#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17333#[derive(Debug, Clone, PartialEq)]
17334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17336pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17337    #[doc = "Timestamp (time since system boot)."]
17338    pub time_boot_ms: u32,
17339    #[doc = "X Position"]
17340    pub x: f32,
17341    #[doc = "Y Position"]
17342    pub y: f32,
17343    #[doc = "Z Position"]
17344    pub z: f32,
17345    #[doc = "Roll"]
17346    pub roll: f32,
17347    #[doc = "Pitch"]
17348    pub pitch: f32,
17349    #[doc = "Yaw"]
17350    pub yaw: f32,
17351}
17352impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17353    pub const ENCODED_LEN: usize = 28usize;
17354    pub const DEFAULT: Self = Self {
17355        time_boot_ms: 0_u32,
17356        x: 0.0_f32,
17357        y: 0.0_f32,
17358        z: 0.0_f32,
17359        roll: 0.0_f32,
17360        pitch: 0.0_f32,
17361        yaw: 0.0_f32,
17362    };
17363    #[cfg(feature = "arbitrary")]
17364    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17365        use arbitrary::{Arbitrary, Unstructured};
17366        let mut buf = [0u8; 1024];
17367        rng.fill_bytes(&mut buf);
17368        let mut unstructured = Unstructured::new(&buf);
17369        Self::arbitrary(&mut unstructured).unwrap_or_default()
17370    }
17371}
17372impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17373    fn default() -> Self {
17374        Self::DEFAULT.clone()
17375    }
17376}
17377impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17378    type Message = MavMessage;
17379    const ID: u32 = 89u32;
17380    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17381    const EXTRA_CRC: u8 = 231u8;
17382    const ENCODED_LEN: usize = 28usize;
17383    fn deser(
17384        _version: MavlinkVersion,
17385        __input: &[u8],
17386    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17387        let avail_len = __input.len();
17388        let mut payload_buf = [0; Self::ENCODED_LEN];
17389        let mut buf = if avail_len < Self::ENCODED_LEN {
17390            payload_buf[0..avail_len].copy_from_slice(__input);
17391            Bytes::new(&payload_buf)
17392        } else {
17393            Bytes::new(__input)
17394        };
17395        let mut __struct = Self::default();
17396        __struct.time_boot_ms = buf.get_u32_le();
17397        __struct.x = buf.get_f32_le();
17398        __struct.y = buf.get_f32_le();
17399        __struct.z = buf.get_f32_le();
17400        __struct.roll = buf.get_f32_le();
17401        __struct.pitch = buf.get_f32_le();
17402        __struct.yaw = buf.get_f32_le();
17403        Ok(__struct)
17404    }
17405    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17406        let mut __tmp = BytesMut::new(bytes);
17407        #[allow(clippy::absurd_extreme_comparisons)]
17408        #[allow(unused_comparisons)]
17409        if __tmp.remaining() < Self::ENCODED_LEN {
17410            panic!(
17411                "buffer is too small (need {} bytes, but got {})",
17412                Self::ENCODED_LEN,
17413                __tmp.remaining(),
17414            )
17415        }
17416        __tmp.put_u32_le(self.time_boot_ms);
17417        __tmp.put_f32_le(self.x);
17418        __tmp.put_f32_le(self.y);
17419        __tmp.put_f32_le(self.z);
17420        __tmp.put_f32_le(self.roll);
17421        __tmp.put_f32_le(self.pitch);
17422        __tmp.put_f32_le(self.yaw);
17423        if matches!(version, MavlinkVersion::V2) {
17424            let len = __tmp.len();
17425            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17426        } else {
17427            __tmp.len()
17428        }
17429    }
17430}
17431#[doc = "id: 268"]
17432#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17433#[derive(Debug, Clone, PartialEq)]
17434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17436pub struct LOGGING_ACK_DATA {
17437    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17438    pub sequence: u16,
17439    #[doc = "system ID of the target"]
17440    pub target_system: u8,
17441    #[doc = "component ID of the target"]
17442    pub target_component: u8,
17443}
17444impl LOGGING_ACK_DATA {
17445    pub const ENCODED_LEN: usize = 4usize;
17446    pub const DEFAULT: Self = Self {
17447        sequence: 0_u16,
17448        target_system: 0_u8,
17449        target_component: 0_u8,
17450    };
17451    #[cfg(feature = "arbitrary")]
17452    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17453        use arbitrary::{Arbitrary, Unstructured};
17454        let mut buf = [0u8; 1024];
17455        rng.fill_bytes(&mut buf);
17456        let mut unstructured = Unstructured::new(&buf);
17457        Self::arbitrary(&mut unstructured).unwrap_or_default()
17458    }
17459}
17460impl Default for LOGGING_ACK_DATA {
17461    fn default() -> Self {
17462        Self::DEFAULT.clone()
17463    }
17464}
17465impl MessageData for LOGGING_ACK_DATA {
17466    type Message = MavMessage;
17467    const ID: u32 = 268u32;
17468    const NAME: &'static str = "LOGGING_ACK";
17469    const EXTRA_CRC: u8 = 14u8;
17470    const ENCODED_LEN: usize = 4usize;
17471    fn deser(
17472        _version: MavlinkVersion,
17473        __input: &[u8],
17474    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17475        let avail_len = __input.len();
17476        let mut payload_buf = [0; Self::ENCODED_LEN];
17477        let mut buf = if avail_len < Self::ENCODED_LEN {
17478            payload_buf[0..avail_len].copy_from_slice(__input);
17479            Bytes::new(&payload_buf)
17480        } else {
17481            Bytes::new(__input)
17482        };
17483        let mut __struct = Self::default();
17484        __struct.sequence = buf.get_u16_le();
17485        __struct.target_system = buf.get_u8();
17486        __struct.target_component = buf.get_u8();
17487        Ok(__struct)
17488    }
17489    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17490        let mut __tmp = BytesMut::new(bytes);
17491        #[allow(clippy::absurd_extreme_comparisons)]
17492        #[allow(unused_comparisons)]
17493        if __tmp.remaining() < Self::ENCODED_LEN {
17494            panic!(
17495                "buffer is too small (need {} bytes, but got {})",
17496                Self::ENCODED_LEN,
17497                __tmp.remaining(),
17498            )
17499        }
17500        __tmp.put_u16_le(self.sequence);
17501        __tmp.put_u8(self.target_system);
17502        __tmp.put_u8(self.target_component);
17503        if matches!(version, MavlinkVersion::V2) {
17504            let len = __tmp.len();
17505            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17506        } else {
17507            __tmp.len()
17508        }
17509    }
17510}
17511#[doc = "id: 266"]
17512#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17513#[derive(Debug, Clone, PartialEq)]
17514#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17515#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17516pub struct LOGGING_DATA_DATA {
17517    #[doc = "sequence number (can wrap)"]
17518    pub sequence: u16,
17519    #[doc = "system ID of the target"]
17520    pub target_system: u8,
17521    #[doc = "component ID of the target"]
17522    pub target_component: u8,
17523    #[doc = "data length"]
17524    pub length: u8,
17525    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17526    pub first_message_offset: u8,
17527    #[doc = "logged data"]
17528    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17529    pub data: [u8; 249],
17530}
17531impl LOGGING_DATA_DATA {
17532    pub const ENCODED_LEN: usize = 255usize;
17533    pub const DEFAULT: Self = Self {
17534        sequence: 0_u16,
17535        target_system: 0_u8,
17536        target_component: 0_u8,
17537        length: 0_u8,
17538        first_message_offset: 0_u8,
17539        data: [0_u8; 249usize],
17540    };
17541    #[cfg(feature = "arbitrary")]
17542    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17543        use arbitrary::{Arbitrary, Unstructured};
17544        let mut buf = [0u8; 1024];
17545        rng.fill_bytes(&mut buf);
17546        let mut unstructured = Unstructured::new(&buf);
17547        Self::arbitrary(&mut unstructured).unwrap_or_default()
17548    }
17549}
17550impl Default for LOGGING_DATA_DATA {
17551    fn default() -> Self {
17552        Self::DEFAULT.clone()
17553    }
17554}
17555impl MessageData for LOGGING_DATA_DATA {
17556    type Message = MavMessage;
17557    const ID: u32 = 266u32;
17558    const NAME: &'static str = "LOGGING_DATA";
17559    const EXTRA_CRC: u8 = 193u8;
17560    const ENCODED_LEN: usize = 255usize;
17561    fn deser(
17562        _version: MavlinkVersion,
17563        __input: &[u8],
17564    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17565        let avail_len = __input.len();
17566        let mut payload_buf = [0; Self::ENCODED_LEN];
17567        let mut buf = if avail_len < Self::ENCODED_LEN {
17568            payload_buf[0..avail_len].copy_from_slice(__input);
17569            Bytes::new(&payload_buf)
17570        } else {
17571            Bytes::new(__input)
17572        };
17573        let mut __struct = Self::default();
17574        __struct.sequence = buf.get_u16_le();
17575        __struct.target_system = buf.get_u8();
17576        __struct.target_component = buf.get_u8();
17577        __struct.length = buf.get_u8();
17578        __struct.first_message_offset = buf.get_u8();
17579        for v in &mut __struct.data {
17580            let val = buf.get_u8();
17581            *v = val;
17582        }
17583        Ok(__struct)
17584    }
17585    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17586        let mut __tmp = BytesMut::new(bytes);
17587        #[allow(clippy::absurd_extreme_comparisons)]
17588        #[allow(unused_comparisons)]
17589        if __tmp.remaining() < Self::ENCODED_LEN {
17590            panic!(
17591                "buffer is too small (need {} bytes, but got {})",
17592                Self::ENCODED_LEN,
17593                __tmp.remaining(),
17594            )
17595        }
17596        __tmp.put_u16_le(self.sequence);
17597        __tmp.put_u8(self.target_system);
17598        __tmp.put_u8(self.target_component);
17599        __tmp.put_u8(self.length);
17600        __tmp.put_u8(self.first_message_offset);
17601        for val in &self.data {
17602            __tmp.put_u8(*val);
17603        }
17604        if matches!(version, MavlinkVersion::V2) {
17605            let len = __tmp.len();
17606            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17607        } else {
17608            __tmp.len()
17609        }
17610    }
17611}
17612#[doc = "id: 267"]
17613#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17614#[derive(Debug, Clone, PartialEq)]
17615#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17616#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17617pub struct LOGGING_DATA_ACKED_DATA {
17618    #[doc = "sequence number (can wrap)"]
17619    pub sequence: u16,
17620    #[doc = "system ID of the target"]
17621    pub target_system: u8,
17622    #[doc = "component ID of the target"]
17623    pub target_component: u8,
17624    #[doc = "data length"]
17625    pub length: u8,
17626    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17627    pub first_message_offset: u8,
17628    #[doc = "logged data"]
17629    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17630    pub data: [u8; 249],
17631}
17632impl LOGGING_DATA_ACKED_DATA {
17633    pub const ENCODED_LEN: usize = 255usize;
17634    pub const DEFAULT: Self = Self {
17635        sequence: 0_u16,
17636        target_system: 0_u8,
17637        target_component: 0_u8,
17638        length: 0_u8,
17639        first_message_offset: 0_u8,
17640        data: [0_u8; 249usize],
17641    };
17642    #[cfg(feature = "arbitrary")]
17643    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17644        use arbitrary::{Arbitrary, Unstructured};
17645        let mut buf = [0u8; 1024];
17646        rng.fill_bytes(&mut buf);
17647        let mut unstructured = Unstructured::new(&buf);
17648        Self::arbitrary(&mut unstructured).unwrap_or_default()
17649    }
17650}
17651impl Default for LOGGING_DATA_ACKED_DATA {
17652    fn default() -> Self {
17653        Self::DEFAULT.clone()
17654    }
17655}
17656impl MessageData for LOGGING_DATA_ACKED_DATA {
17657    type Message = MavMessage;
17658    const ID: u32 = 267u32;
17659    const NAME: &'static str = "LOGGING_DATA_ACKED";
17660    const EXTRA_CRC: u8 = 35u8;
17661    const ENCODED_LEN: usize = 255usize;
17662    fn deser(
17663        _version: MavlinkVersion,
17664        __input: &[u8],
17665    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17666        let avail_len = __input.len();
17667        let mut payload_buf = [0; Self::ENCODED_LEN];
17668        let mut buf = if avail_len < Self::ENCODED_LEN {
17669            payload_buf[0..avail_len].copy_from_slice(__input);
17670            Bytes::new(&payload_buf)
17671        } else {
17672            Bytes::new(__input)
17673        };
17674        let mut __struct = Self::default();
17675        __struct.sequence = buf.get_u16_le();
17676        __struct.target_system = buf.get_u8();
17677        __struct.target_component = buf.get_u8();
17678        __struct.length = buf.get_u8();
17679        __struct.first_message_offset = buf.get_u8();
17680        for v in &mut __struct.data {
17681            let val = buf.get_u8();
17682            *v = val;
17683        }
17684        Ok(__struct)
17685    }
17686    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17687        let mut __tmp = BytesMut::new(bytes);
17688        #[allow(clippy::absurd_extreme_comparisons)]
17689        #[allow(unused_comparisons)]
17690        if __tmp.remaining() < Self::ENCODED_LEN {
17691            panic!(
17692                "buffer is too small (need {} bytes, but got {})",
17693                Self::ENCODED_LEN,
17694                __tmp.remaining(),
17695            )
17696        }
17697        __tmp.put_u16_le(self.sequence);
17698        __tmp.put_u8(self.target_system);
17699        __tmp.put_u8(self.target_component);
17700        __tmp.put_u8(self.length);
17701        __tmp.put_u8(self.first_message_offset);
17702        for val in &self.data {
17703            __tmp.put_u8(*val);
17704        }
17705        if matches!(version, MavlinkVersion::V2) {
17706            let len = __tmp.len();
17707            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17708        } else {
17709            __tmp.len()
17710        }
17711    }
17712}
17713#[doc = "id: 120"]
17714#[doc = "Reply to LOG_REQUEST_DATA."]
17715#[derive(Debug, Clone, PartialEq)]
17716#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17717#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17718pub struct LOG_DATA_DATA {
17719    #[doc = "Offset into the log"]
17720    pub ofs: u32,
17721    #[doc = "Log id (from LOG_ENTRY reply)"]
17722    pub id: u16,
17723    #[doc = "Number of bytes (zero for end of log)"]
17724    pub count: u8,
17725    #[doc = "log data"]
17726    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17727    pub data: [u8; 90],
17728}
17729impl LOG_DATA_DATA {
17730    pub const ENCODED_LEN: usize = 97usize;
17731    pub const DEFAULT: Self = Self {
17732        ofs: 0_u32,
17733        id: 0_u16,
17734        count: 0_u8,
17735        data: [0_u8; 90usize],
17736    };
17737    #[cfg(feature = "arbitrary")]
17738    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17739        use arbitrary::{Arbitrary, Unstructured};
17740        let mut buf = [0u8; 1024];
17741        rng.fill_bytes(&mut buf);
17742        let mut unstructured = Unstructured::new(&buf);
17743        Self::arbitrary(&mut unstructured).unwrap_or_default()
17744    }
17745}
17746impl Default for LOG_DATA_DATA {
17747    fn default() -> Self {
17748        Self::DEFAULT.clone()
17749    }
17750}
17751impl MessageData for LOG_DATA_DATA {
17752    type Message = MavMessage;
17753    const ID: u32 = 120u32;
17754    const NAME: &'static str = "LOG_DATA";
17755    const EXTRA_CRC: u8 = 134u8;
17756    const ENCODED_LEN: usize = 97usize;
17757    fn deser(
17758        _version: MavlinkVersion,
17759        __input: &[u8],
17760    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17761        let avail_len = __input.len();
17762        let mut payload_buf = [0; Self::ENCODED_LEN];
17763        let mut buf = if avail_len < Self::ENCODED_LEN {
17764            payload_buf[0..avail_len].copy_from_slice(__input);
17765            Bytes::new(&payload_buf)
17766        } else {
17767            Bytes::new(__input)
17768        };
17769        let mut __struct = Self::default();
17770        __struct.ofs = buf.get_u32_le();
17771        __struct.id = buf.get_u16_le();
17772        __struct.count = buf.get_u8();
17773        for v in &mut __struct.data {
17774            let val = buf.get_u8();
17775            *v = val;
17776        }
17777        Ok(__struct)
17778    }
17779    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17780        let mut __tmp = BytesMut::new(bytes);
17781        #[allow(clippy::absurd_extreme_comparisons)]
17782        #[allow(unused_comparisons)]
17783        if __tmp.remaining() < Self::ENCODED_LEN {
17784            panic!(
17785                "buffer is too small (need {} bytes, but got {})",
17786                Self::ENCODED_LEN,
17787                __tmp.remaining(),
17788            )
17789        }
17790        __tmp.put_u32_le(self.ofs);
17791        __tmp.put_u16_le(self.id);
17792        __tmp.put_u8(self.count);
17793        for val in &self.data {
17794            __tmp.put_u8(*val);
17795        }
17796        if matches!(version, MavlinkVersion::V2) {
17797            let len = __tmp.len();
17798            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17799        } else {
17800            __tmp.len()
17801        }
17802    }
17803}
17804#[doc = "id: 118"]
17805#[doc = "Reply to LOG_REQUEST_LIST."]
17806#[derive(Debug, Clone, PartialEq)]
17807#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17808#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17809pub struct LOG_ENTRY_DATA {
17810    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
17811    pub time_utc: u32,
17812    #[doc = "Size of the log (may be approximate)"]
17813    pub size: u32,
17814    #[doc = "Log id"]
17815    pub id: u16,
17816    #[doc = "Total number of logs"]
17817    pub num_logs: u16,
17818    #[doc = "High log number"]
17819    pub last_log_num: u16,
17820}
17821impl LOG_ENTRY_DATA {
17822    pub const ENCODED_LEN: usize = 14usize;
17823    pub const DEFAULT: Self = Self {
17824        time_utc: 0_u32,
17825        size: 0_u32,
17826        id: 0_u16,
17827        num_logs: 0_u16,
17828        last_log_num: 0_u16,
17829    };
17830    #[cfg(feature = "arbitrary")]
17831    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17832        use arbitrary::{Arbitrary, Unstructured};
17833        let mut buf = [0u8; 1024];
17834        rng.fill_bytes(&mut buf);
17835        let mut unstructured = Unstructured::new(&buf);
17836        Self::arbitrary(&mut unstructured).unwrap_or_default()
17837    }
17838}
17839impl Default for LOG_ENTRY_DATA {
17840    fn default() -> Self {
17841        Self::DEFAULT.clone()
17842    }
17843}
17844impl MessageData for LOG_ENTRY_DATA {
17845    type Message = MavMessage;
17846    const ID: u32 = 118u32;
17847    const NAME: &'static str = "LOG_ENTRY";
17848    const EXTRA_CRC: u8 = 56u8;
17849    const ENCODED_LEN: usize = 14usize;
17850    fn deser(
17851        _version: MavlinkVersion,
17852        __input: &[u8],
17853    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17854        let avail_len = __input.len();
17855        let mut payload_buf = [0; Self::ENCODED_LEN];
17856        let mut buf = if avail_len < Self::ENCODED_LEN {
17857            payload_buf[0..avail_len].copy_from_slice(__input);
17858            Bytes::new(&payload_buf)
17859        } else {
17860            Bytes::new(__input)
17861        };
17862        let mut __struct = Self::default();
17863        __struct.time_utc = buf.get_u32_le();
17864        __struct.size = buf.get_u32_le();
17865        __struct.id = buf.get_u16_le();
17866        __struct.num_logs = buf.get_u16_le();
17867        __struct.last_log_num = buf.get_u16_le();
17868        Ok(__struct)
17869    }
17870    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17871        let mut __tmp = BytesMut::new(bytes);
17872        #[allow(clippy::absurd_extreme_comparisons)]
17873        #[allow(unused_comparisons)]
17874        if __tmp.remaining() < Self::ENCODED_LEN {
17875            panic!(
17876                "buffer is too small (need {} bytes, but got {})",
17877                Self::ENCODED_LEN,
17878                __tmp.remaining(),
17879            )
17880        }
17881        __tmp.put_u32_le(self.time_utc);
17882        __tmp.put_u32_le(self.size);
17883        __tmp.put_u16_le(self.id);
17884        __tmp.put_u16_le(self.num_logs);
17885        __tmp.put_u16_le(self.last_log_num);
17886        if matches!(version, MavlinkVersion::V2) {
17887            let len = __tmp.len();
17888            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17889        } else {
17890            __tmp.len()
17891        }
17892    }
17893}
17894#[doc = "id: 121"]
17895#[doc = "Erase all logs."]
17896#[derive(Debug, Clone, PartialEq)]
17897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17899pub struct LOG_ERASE_DATA {
17900    #[doc = "System ID"]
17901    pub target_system: u8,
17902    #[doc = "Component ID"]
17903    pub target_component: u8,
17904}
17905impl LOG_ERASE_DATA {
17906    pub const ENCODED_LEN: usize = 2usize;
17907    pub const DEFAULT: Self = Self {
17908        target_system: 0_u8,
17909        target_component: 0_u8,
17910    };
17911    #[cfg(feature = "arbitrary")]
17912    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17913        use arbitrary::{Arbitrary, Unstructured};
17914        let mut buf = [0u8; 1024];
17915        rng.fill_bytes(&mut buf);
17916        let mut unstructured = Unstructured::new(&buf);
17917        Self::arbitrary(&mut unstructured).unwrap_or_default()
17918    }
17919}
17920impl Default for LOG_ERASE_DATA {
17921    fn default() -> Self {
17922        Self::DEFAULT.clone()
17923    }
17924}
17925impl MessageData for LOG_ERASE_DATA {
17926    type Message = MavMessage;
17927    const ID: u32 = 121u32;
17928    const NAME: &'static str = "LOG_ERASE";
17929    const EXTRA_CRC: u8 = 237u8;
17930    const ENCODED_LEN: usize = 2usize;
17931    fn deser(
17932        _version: MavlinkVersion,
17933        __input: &[u8],
17934    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17935        let avail_len = __input.len();
17936        let mut payload_buf = [0; Self::ENCODED_LEN];
17937        let mut buf = if avail_len < Self::ENCODED_LEN {
17938            payload_buf[0..avail_len].copy_from_slice(__input);
17939            Bytes::new(&payload_buf)
17940        } else {
17941            Bytes::new(__input)
17942        };
17943        let mut __struct = Self::default();
17944        __struct.target_system = buf.get_u8();
17945        __struct.target_component = buf.get_u8();
17946        Ok(__struct)
17947    }
17948    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17949        let mut __tmp = BytesMut::new(bytes);
17950        #[allow(clippy::absurd_extreme_comparisons)]
17951        #[allow(unused_comparisons)]
17952        if __tmp.remaining() < Self::ENCODED_LEN {
17953            panic!(
17954                "buffer is too small (need {} bytes, but got {})",
17955                Self::ENCODED_LEN,
17956                __tmp.remaining(),
17957            )
17958        }
17959        __tmp.put_u8(self.target_system);
17960        __tmp.put_u8(self.target_component);
17961        if matches!(version, MavlinkVersion::V2) {
17962            let len = __tmp.len();
17963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17964        } else {
17965            __tmp.len()
17966        }
17967    }
17968}
17969#[doc = "id: 119"]
17970#[doc = "Request a chunk of a log."]
17971#[derive(Debug, Clone, PartialEq)]
17972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17974pub struct LOG_REQUEST_DATA_DATA {
17975    #[doc = "Offset into the log"]
17976    pub ofs: u32,
17977    #[doc = "Number of bytes"]
17978    pub count: u32,
17979    #[doc = "Log id (from LOG_ENTRY reply)"]
17980    pub id: u16,
17981    #[doc = "System ID"]
17982    pub target_system: u8,
17983    #[doc = "Component ID"]
17984    pub target_component: u8,
17985}
17986impl LOG_REQUEST_DATA_DATA {
17987    pub const ENCODED_LEN: usize = 12usize;
17988    pub const DEFAULT: Self = Self {
17989        ofs: 0_u32,
17990        count: 0_u32,
17991        id: 0_u16,
17992        target_system: 0_u8,
17993        target_component: 0_u8,
17994    };
17995    #[cfg(feature = "arbitrary")]
17996    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17997        use arbitrary::{Arbitrary, Unstructured};
17998        let mut buf = [0u8; 1024];
17999        rng.fill_bytes(&mut buf);
18000        let mut unstructured = Unstructured::new(&buf);
18001        Self::arbitrary(&mut unstructured).unwrap_or_default()
18002    }
18003}
18004impl Default for LOG_REQUEST_DATA_DATA {
18005    fn default() -> Self {
18006        Self::DEFAULT.clone()
18007    }
18008}
18009impl MessageData for LOG_REQUEST_DATA_DATA {
18010    type Message = MavMessage;
18011    const ID: u32 = 119u32;
18012    const NAME: &'static str = "LOG_REQUEST_DATA";
18013    const EXTRA_CRC: u8 = 116u8;
18014    const ENCODED_LEN: usize = 12usize;
18015    fn deser(
18016        _version: MavlinkVersion,
18017        __input: &[u8],
18018    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18019        let avail_len = __input.len();
18020        let mut payload_buf = [0; Self::ENCODED_LEN];
18021        let mut buf = if avail_len < Self::ENCODED_LEN {
18022            payload_buf[0..avail_len].copy_from_slice(__input);
18023            Bytes::new(&payload_buf)
18024        } else {
18025            Bytes::new(__input)
18026        };
18027        let mut __struct = Self::default();
18028        __struct.ofs = buf.get_u32_le();
18029        __struct.count = buf.get_u32_le();
18030        __struct.id = buf.get_u16_le();
18031        __struct.target_system = buf.get_u8();
18032        __struct.target_component = buf.get_u8();
18033        Ok(__struct)
18034    }
18035    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18036        let mut __tmp = BytesMut::new(bytes);
18037        #[allow(clippy::absurd_extreme_comparisons)]
18038        #[allow(unused_comparisons)]
18039        if __tmp.remaining() < Self::ENCODED_LEN {
18040            panic!(
18041                "buffer is too small (need {} bytes, but got {})",
18042                Self::ENCODED_LEN,
18043                __tmp.remaining(),
18044            )
18045        }
18046        __tmp.put_u32_le(self.ofs);
18047        __tmp.put_u32_le(self.count);
18048        __tmp.put_u16_le(self.id);
18049        __tmp.put_u8(self.target_system);
18050        __tmp.put_u8(self.target_component);
18051        if matches!(version, MavlinkVersion::V2) {
18052            let len = __tmp.len();
18053            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18054        } else {
18055            __tmp.len()
18056        }
18057    }
18058}
18059#[doc = "id: 122"]
18060#[doc = "Stop log transfer and resume normal logging."]
18061#[derive(Debug, Clone, PartialEq)]
18062#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18064pub struct LOG_REQUEST_END_DATA {
18065    #[doc = "System ID"]
18066    pub target_system: u8,
18067    #[doc = "Component ID"]
18068    pub target_component: u8,
18069}
18070impl LOG_REQUEST_END_DATA {
18071    pub const ENCODED_LEN: usize = 2usize;
18072    pub const DEFAULT: Self = Self {
18073        target_system: 0_u8,
18074        target_component: 0_u8,
18075    };
18076    #[cfg(feature = "arbitrary")]
18077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18078        use arbitrary::{Arbitrary, Unstructured};
18079        let mut buf = [0u8; 1024];
18080        rng.fill_bytes(&mut buf);
18081        let mut unstructured = Unstructured::new(&buf);
18082        Self::arbitrary(&mut unstructured).unwrap_or_default()
18083    }
18084}
18085impl Default for LOG_REQUEST_END_DATA {
18086    fn default() -> Self {
18087        Self::DEFAULT.clone()
18088    }
18089}
18090impl MessageData for LOG_REQUEST_END_DATA {
18091    type Message = MavMessage;
18092    const ID: u32 = 122u32;
18093    const NAME: &'static str = "LOG_REQUEST_END";
18094    const EXTRA_CRC: u8 = 203u8;
18095    const ENCODED_LEN: usize = 2usize;
18096    fn deser(
18097        _version: MavlinkVersion,
18098        __input: &[u8],
18099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18100        let avail_len = __input.len();
18101        let mut payload_buf = [0; Self::ENCODED_LEN];
18102        let mut buf = if avail_len < Self::ENCODED_LEN {
18103            payload_buf[0..avail_len].copy_from_slice(__input);
18104            Bytes::new(&payload_buf)
18105        } else {
18106            Bytes::new(__input)
18107        };
18108        let mut __struct = Self::default();
18109        __struct.target_system = buf.get_u8();
18110        __struct.target_component = buf.get_u8();
18111        Ok(__struct)
18112    }
18113    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18114        let mut __tmp = BytesMut::new(bytes);
18115        #[allow(clippy::absurd_extreme_comparisons)]
18116        #[allow(unused_comparisons)]
18117        if __tmp.remaining() < Self::ENCODED_LEN {
18118            panic!(
18119                "buffer is too small (need {} bytes, but got {})",
18120                Self::ENCODED_LEN,
18121                __tmp.remaining(),
18122            )
18123        }
18124        __tmp.put_u8(self.target_system);
18125        __tmp.put_u8(self.target_component);
18126        if matches!(version, MavlinkVersion::V2) {
18127            let len = __tmp.len();
18128            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18129        } else {
18130            __tmp.len()
18131        }
18132    }
18133}
18134#[doc = "id: 117"]
18135#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
18136#[derive(Debug, Clone, PartialEq)]
18137#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18138#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18139pub struct LOG_REQUEST_LIST_DATA {
18140    #[doc = "First log id (0 for first available)"]
18141    pub start: u16,
18142    #[doc = "Last log id (0xffff for last available)"]
18143    pub end: u16,
18144    #[doc = "System ID"]
18145    pub target_system: u8,
18146    #[doc = "Component ID"]
18147    pub target_component: u8,
18148}
18149impl LOG_REQUEST_LIST_DATA {
18150    pub const ENCODED_LEN: usize = 6usize;
18151    pub const DEFAULT: Self = Self {
18152        start: 0_u16,
18153        end: 0_u16,
18154        target_system: 0_u8,
18155        target_component: 0_u8,
18156    };
18157    #[cfg(feature = "arbitrary")]
18158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18159        use arbitrary::{Arbitrary, Unstructured};
18160        let mut buf = [0u8; 1024];
18161        rng.fill_bytes(&mut buf);
18162        let mut unstructured = Unstructured::new(&buf);
18163        Self::arbitrary(&mut unstructured).unwrap_or_default()
18164    }
18165}
18166impl Default for LOG_REQUEST_LIST_DATA {
18167    fn default() -> Self {
18168        Self::DEFAULT.clone()
18169    }
18170}
18171impl MessageData for LOG_REQUEST_LIST_DATA {
18172    type Message = MavMessage;
18173    const ID: u32 = 117u32;
18174    const NAME: &'static str = "LOG_REQUEST_LIST";
18175    const EXTRA_CRC: u8 = 128u8;
18176    const ENCODED_LEN: usize = 6usize;
18177    fn deser(
18178        _version: MavlinkVersion,
18179        __input: &[u8],
18180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18181        let avail_len = __input.len();
18182        let mut payload_buf = [0; Self::ENCODED_LEN];
18183        let mut buf = if avail_len < Self::ENCODED_LEN {
18184            payload_buf[0..avail_len].copy_from_slice(__input);
18185            Bytes::new(&payload_buf)
18186        } else {
18187            Bytes::new(__input)
18188        };
18189        let mut __struct = Self::default();
18190        __struct.start = buf.get_u16_le();
18191        __struct.end = buf.get_u16_le();
18192        __struct.target_system = buf.get_u8();
18193        __struct.target_component = buf.get_u8();
18194        Ok(__struct)
18195    }
18196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18197        let mut __tmp = BytesMut::new(bytes);
18198        #[allow(clippy::absurd_extreme_comparisons)]
18199        #[allow(unused_comparisons)]
18200        if __tmp.remaining() < Self::ENCODED_LEN {
18201            panic!(
18202                "buffer is too small (need {} bytes, but got {})",
18203                Self::ENCODED_LEN,
18204                __tmp.remaining(),
18205            )
18206        }
18207        __tmp.put_u16_le(self.start);
18208        __tmp.put_u16_le(self.end);
18209        __tmp.put_u8(self.target_system);
18210        __tmp.put_u8(self.target_component);
18211        if matches!(version, MavlinkVersion::V2) {
18212            let len = __tmp.len();
18213            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18214        } else {
18215            __tmp.len()
18216        }
18217    }
18218}
18219#[doc = "id: 192"]
18220#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
18221#[derive(Debug, Clone, PartialEq)]
18222#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18223#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18224pub struct MAG_CAL_REPORT_DATA {
18225    #[doc = "RMS milligauss residuals."]
18226    pub fitness: f32,
18227    #[doc = "X offset."]
18228    pub ofs_x: f32,
18229    #[doc = "Y offset."]
18230    pub ofs_y: f32,
18231    #[doc = "Z offset."]
18232    pub ofs_z: f32,
18233    #[doc = "X diagonal (matrix 11)."]
18234    pub diag_x: f32,
18235    #[doc = "Y diagonal (matrix 22)."]
18236    pub diag_y: f32,
18237    #[doc = "Z diagonal (matrix 33)."]
18238    pub diag_z: f32,
18239    #[doc = "X off-diagonal (matrix 12 and 21)."]
18240    pub offdiag_x: f32,
18241    #[doc = "Y off-diagonal (matrix 13 and 31)."]
18242    pub offdiag_y: f32,
18243    #[doc = "Z off-diagonal (matrix 32 and 23)."]
18244    pub offdiag_z: f32,
18245    #[doc = "Compass being calibrated."]
18246    pub compass_id: u8,
18247    #[doc = "Bitmask of compasses being calibrated."]
18248    pub cal_mask: u8,
18249    #[doc = "Calibration Status."]
18250    pub cal_status: MagCalStatus,
18251    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
18252    pub autosaved: u8,
18253    #[doc = "Confidence in orientation (higher is better)."]
18254    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18255    pub orientation_confidence: f32,
18256    #[doc = "orientation before calibration."]
18257    #[cfg_attr(feature = "serde", serde(default))]
18258    pub old_orientation: MavSensorOrientation,
18259    #[doc = "orientation after calibration."]
18260    #[cfg_attr(feature = "serde", serde(default))]
18261    pub new_orientation: MavSensorOrientation,
18262    #[doc = "field radius correction factor"]
18263    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18264    pub scale_factor: f32,
18265}
18266impl MAG_CAL_REPORT_DATA {
18267    pub const ENCODED_LEN: usize = 54usize;
18268    pub const DEFAULT: Self = Self {
18269        fitness: 0.0_f32,
18270        ofs_x: 0.0_f32,
18271        ofs_y: 0.0_f32,
18272        ofs_z: 0.0_f32,
18273        diag_x: 0.0_f32,
18274        diag_y: 0.0_f32,
18275        diag_z: 0.0_f32,
18276        offdiag_x: 0.0_f32,
18277        offdiag_y: 0.0_f32,
18278        offdiag_z: 0.0_f32,
18279        compass_id: 0_u8,
18280        cal_mask: 0_u8,
18281        cal_status: MagCalStatus::DEFAULT,
18282        autosaved: 0_u8,
18283        orientation_confidence: 0.0_f32,
18284        old_orientation: MavSensorOrientation::DEFAULT,
18285        new_orientation: MavSensorOrientation::DEFAULT,
18286        scale_factor: 0.0_f32,
18287    };
18288    #[cfg(feature = "arbitrary")]
18289    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18290        use arbitrary::{Arbitrary, Unstructured};
18291        let mut buf = [0u8; 1024];
18292        rng.fill_bytes(&mut buf);
18293        let mut unstructured = Unstructured::new(&buf);
18294        Self::arbitrary(&mut unstructured).unwrap_or_default()
18295    }
18296}
18297impl Default for MAG_CAL_REPORT_DATA {
18298    fn default() -> Self {
18299        Self::DEFAULT.clone()
18300    }
18301}
18302impl MessageData for MAG_CAL_REPORT_DATA {
18303    type Message = MavMessage;
18304    const ID: u32 = 192u32;
18305    const NAME: &'static str = "MAG_CAL_REPORT";
18306    const EXTRA_CRC: u8 = 36u8;
18307    const ENCODED_LEN: usize = 54usize;
18308    fn deser(
18309        _version: MavlinkVersion,
18310        __input: &[u8],
18311    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18312        let avail_len = __input.len();
18313        let mut payload_buf = [0; Self::ENCODED_LEN];
18314        let mut buf = if avail_len < Self::ENCODED_LEN {
18315            payload_buf[0..avail_len].copy_from_slice(__input);
18316            Bytes::new(&payload_buf)
18317        } else {
18318            Bytes::new(__input)
18319        };
18320        let mut __struct = Self::default();
18321        __struct.fitness = buf.get_f32_le();
18322        __struct.ofs_x = buf.get_f32_le();
18323        __struct.ofs_y = buf.get_f32_le();
18324        __struct.ofs_z = buf.get_f32_le();
18325        __struct.diag_x = buf.get_f32_le();
18326        __struct.diag_y = buf.get_f32_le();
18327        __struct.diag_z = buf.get_f32_le();
18328        __struct.offdiag_x = buf.get_f32_le();
18329        __struct.offdiag_y = buf.get_f32_le();
18330        __struct.offdiag_z = buf.get_f32_le();
18331        __struct.compass_id = buf.get_u8();
18332        __struct.cal_mask = buf.get_u8();
18333        let tmp = buf.get_u8();
18334        __struct.cal_status =
18335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18336                enum_type: "MagCalStatus",
18337                value: tmp as u32,
18338            })?;
18339        __struct.autosaved = buf.get_u8();
18340        __struct.orientation_confidence = buf.get_f32_le();
18341        let tmp = buf.get_u8();
18342        __struct.old_orientation =
18343            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18344                enum_type: "MavSensorOrientation",
18345                value: tmp as u32,
18346            })?;
18347        let tmp = buf.get_u8();
18348        __struct.new_orientation =
18349            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18350                enum_type: "MavSensorOrientation",
18351                value: tmp as u32,
18352            })?;
18353        __struct.scale_factor = buf.get_f32_le();
18354        Ok(__struct)
18355    }
18356    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18357        let mut __tmp = BytesMut::new(bytes);
18358        #[allow(clippy::absurd_extreme_comparisons)]
18359        #[allow(unused_comparisons)]
18360        if __tmp.remaining() < Self::ENCODED_LEN {
18361            panic!(
18362                "buffer is too small (need {} bytes, but got {})",
18363                Self::ENCODED_LEN,
18364                __tmp.remaining(),
18365            )
18366        }
18367        __tmp.put_f32_le(self.fitness);
18368        __tmp.put_f32_le(self.ofs_x);
18369        __tmp.put_f32_le(self.ofs_y);
18370        __tmp.put_f32_le(self.ofs_z);
18371        __tmp.put_f32_le(self.diag_x);
18372        __tmp.put_f32_le(self.diag_y);
18373        __tmp.put_f32_le(self.diag_z);
18374        __tmp.put_f32_le(self.offdiag_x);
18375        __tmp.put_f32_le(self.offdiag_y);
18376        __tmp.put_f32_le(self.offdiag_z);
18377        __tmp.put_u8(self.compass_id);
18378        __tmp.put_u8(self.cal_mask);
18379        __tmp.put_u8(self.cal_status as u8);
18380        __tmp.put_u8(self.autosaved);
18381        __tmp.put_f32_le(self.orientation_confidence);
18382        __tmp.put_u8(self.old_orientation as u8);
18383        __tmp.put_u8(self.new_orientation as u8);
18384        __tmp.put_f32_le(self.scale_factor);
18385        if matches!(version, MavlinkVersion::V2) {
18386            let len = __tmp.len();
18387            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18388        } else {
18389            __tmp.len()
18390        }
18391    }
18392}
18393#[doc = "id: 69"]
18394#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18395#[derive(Debug, Clone, PartialEq)]
18396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18398pub struct MANUAL_CONTROL_DATA {
18399    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18400    pub x: i16,
18401    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18402    pub y: i16,
18403    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18404    pub z: i16,
18405    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18406    pub r: i16,
18407    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18408    pub buttons: u16,
18409    #[doc = "The system to be controlled."]
18410    pub target: u8,
18411    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18412    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18413    pub buttons2: u16,
18414    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18415    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18416    pub enabled_extensions: u8,
18417    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18418    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18419    pub s: i16,
18420    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18421    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18422    pub t: i16,
18423    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18424    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18425    pub aux1: i16,
18426    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18427    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18428    pub aux2: i16,
18429    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18430    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18431    pub aux3: i16,
18432    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18433    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18434    pub aux4: i16,
18435    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18437    pub aux5: i16,
18438    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18439    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18440    pub aux6: i16,
18441}
18442impl MANUAL_CONTROL_DATA {
18443    pub const ENCODED_LEN: usize = 30usize;
18444    pub const DEFAULT: Self = Self {
18445        x: 0_i16,
18446        y: 0_i16,
18447        z: 0_i16,
18448        r: 0_i16,
18449        buttons: 0_u16,
18450        target: 0_u8,
18451        buttons2: 0_u16,
18452        enabled_extensions: 0_u8,
18453        s: 0_i16,
18454        t: 0_i16,
18455        aux1: 0_i16,
18456        aux2: 0_i16,
18457        aux3: 0_i16,
18458        aux4: 0_i16,
18459        aux5: 0_i16,
18460        aux6: 0_i16,
18461    };
18462    #[cfg(feature = "arbitrary")]
18463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18464        use arbitrary::{Arbitrary, Unstructured};
18465        let mut buf = [0u8; 1024];
18466        rng.fill_bytes(&mut buf);
18467        let mut unstructured = Unstructured::new(&buf);
18468        Self::arbitrary(&mut unstructured).unwrap_or_default()
18469    }
18470}
18471impl Default for MANUAL_CONTROL_DATA {
18472    fn default() -> Self {
18473        Self::DEFAULT.clone()
18474    }
18475}
18476impl MessageData for MANUAL_CONTROL_DATA {
18477    type Message = MavMessage;
18478    const ID: u32 = 69u32;
18479    const NAME: &'static str = "MANUAL_CONTROL";
18480    const EXTRA_CRC: u8 = 243u8;
18481    const ENCODED_LEN: usize = 30usize;
18482    fn deser(
18483        _version: MavlinkVersion,
18484        __input: &[u8],
18485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18486        let avail_len = __input.len();
18487        let mut payload_buf = [0; Self::ENCODED_LEN];
18488        let mut buf = if avail_len < Self::ENCODED_LEN {
18489            payload_buf[0..avail_len].copy_from_slice(__input);
18490            Bytes::new(&payload_buf)
18491        } else {
18492            Bytes::new(__input)
18493        };
18494        let mut __struct = Self::default();
18495        __struct.x = buf.get_i16_le();
18496        __struct.y = buf.get_i16_le();
18497        __struct.z = buf.get_i16_le();
18498        __struct.r = buf.get_i16_le();
18499        __struct.buttons = buf.get_u16_le();
18500        __struct.target = buf.get_u8();
18501        __struct.buttons2 = buf.get_u16_le();
18502        __struct.enabled_extensions = buf.get_u8();
18503        __struct.s = buf.get_i16_le();
18504        __struct.t = buf.get_i16_le();
18505        __struct.aux1 = buf.get_i16_le();
18506        __struct.aux2 = buf.get_i16_le();
18507        __struct.aux3 = buf.get_i16_le();
18508        __struct.aux4 = buf.get_i16_le();
18509        __struct.aux5 = buf.get_i16_le();
18510        __struct.aux6 = buf.get_i16_le();
18511        Ok(__struct)
18512    }
18513    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18514        let mut __tmp = BytesMut::new(bytes);
18515        #[allow(clippy::absurd_extreme_comparisons)]
18516        #[allow(unused_comparisons)]
18517        if __tmp.remaining() < Self::ENCODED_LEN {
18518            panic!(
18519                "buffer is too small (need {} bytes, but got {})",
18520                Self::ENCODED_LEN,
18521                __tmp.remaining(),
18522            )
18523        }
18524        __tmp.put_i16_le(self.x);
18525        __tmp.put_i16_le(self.y);
18526        __tmp.put_i16_le(self.z);
18527        __tmp.put_i16_le(self.r);
18528        __tmp.put_u16_le(self.buttons);
18529        __tmp.put_u8(self.target);
18530        __tmp.put_u16_le(self.buttons2);
18531        __tmp.put_u8(self.enabled_extensions);
18532        __tmp.put_i16_le(self.s);
18533        __tmp.put_i16_le(self.t);
18534        __tmp.put_i16_le(self.aux1);
18535        __tmp.put_i16_le(self.aux2);
18536        __tmp.put_i16_le(self.aux3);
18537        __tmp.put_i16_le(self.aux4);
18538        __tmp.put_i16_le(self.aux5);
18539        __tmp.put_i16_le(self.aux6);
18540        if matches!(version, MavlinkVersion::V2) {
18541            let len = __tmp.len();
18542            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18543        } else {
18544            __tmp.len()
18545        }
18546    }
18547}
18548#[doc = "id: 81"]
18549#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18550#[derive(Debug, Clone, PartialEq)]
18551#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18552#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18553pub struct MANUAL_SETPOINT_DATA {
18554    #[doc = "Timestamp (time since system boot)."]
18555    pub time_boot_ms: u32,
18556    #[doc = "Desired roll rate"]
18557    pub roll: f32,
18558    #[doc = "Desired pitch rate"]
18559    pub pitch: f32,
18560    #[doc = "Desired yaw rate"]
18561    pub yaw: f32,
18562    #[doc = "Collective thrust, normalized to 0 .. 1"]
18563    pub thrust: f32,
18564    #[doc = "Flight mode switch position, 0.. 255"]
18565    pub mode_switch: u8,
18566    #[doc = "Override mode switch position, 0.. 255"]
18567    pub manual_override_switch: u8,
18568}
18569impl MANUAL_SETPOINT_DATA {
18570    pub const ENCODED_LEN: usize = 22usize;
18571    pub const DEFAULT: Self = Self {
18572        time_boot_ms: 0_u32,
18573        roll: 0.0_f32,
18574        pitch: 0.0_f32,
18575        yaw: 0.0_f32,
18576        thrust: 0.0_f32,
18577        mode_switch: 0_u8,
18578        manual_override_switch: 0_u8,
18579    };
18580    #[cfg(feature = "arbitrary")]
18581    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18582        use arbitrary::{Arbitrary, Unstructured};
18583        let mut buf = [0u8; 1024];
18584        rng.fill_bytes(&mut buf);
18585        let mut unstructured = Unstructured::new(&buf);
18586        Self::arbitrary(&mut unstructured).unwrap_or_default()
18587    }
18588}
18589impl Default for MANUAL_SETPOINT_DATA {
18590    fn default() -> Self {
18591        Self::DEFAULT.clone()
18592    }
18593}
18594impl MessageData for MANUAL_SETPOINT_DATA {
18595    type Message = MavMessage;
18596    const ID: u32 = 81u32;
18597    const NAME: &'static str = "MANUAL_SETPOINT";
18598    const EXTRA_CRC: u8 = 106u8;
18599    const ENCODED_LEN: usize = 22usize;
18600    fn deser(
18601        _version: MavlinkVersion,
18602        __input: &[u8],
18603    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18604        let avail_len = __input.len();
18605        let mut payload_buf = [0; Self::ENCODED_LEN];
18606        let mut buf = if avail_len < Self::ENCODED_LEN {
18607            payload_buf[0..avail_len].copy_from_slice(__input);
18608            Bytes::new(&payload_buf)
18609        } else {
18610            Bytes::new(__input)
18611        };
18612        let mut __struct = Self::default();
18613        __struct.time_boot_ms = buf.get_u32_le();
18614        __struct.roll = buf.get_f32_le();
18615        __struct.pitch = buf.get_f32_le();
18616        __struct.yaw = buf.get_f32_le();
18617        __struct.thrust = buf.get_f32_le();
18618        __struct.mode_switch = buf.get_u8();
18619        __struct.manual_override_switch = buf.get_u8();
18620        Ok(__struct)
18621    }
18622    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18623        let mut __tmp = BytesMut::new(bytes);
18624        #[allow(clippy::absurd_extreme_comparisons)]
18625        #[allow(unused_comparisons)]
18626        if __tmp.remaining() < Self::ENCODED_LEN {
18627            panic!(
18628                "buffer is too small (need {} bytes, but got {})",
18629                Self::ENCODED_LEN,
18630                __tmp.remaining(),
18631            )
18632        }
18633        __tmp.put_u32_le(self.time_boot_ms);
18634        __tmp.put_f32_le(self.roll);
18635        __tmp.put_f32_le(self.pitch);
18636        __tmp.put_f32_le(self.yaw);
18637        __tmp.put_f32_le(self.thrust);
18638        __tmp.put_u8(self.mode_switch);
18639        __tmp.put_u8(self.manual_override_switch);
18640        if matches!(version, MavlinkVersion::V2) {
18641            let len = __tmp.len();
18642            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18643        } else {
18644            __tmp.len()
18645        }
18646    }
18647}
18648#[doc = "id: 249"]
18649#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18650#[derive(Debug, Clone, PartialEq)]
18651#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18652#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18653pub struct MEMORY_VECT_DATA {
18654    #[doc = "Starting address of the debug variables"]
18655    pub address: u16,
18656    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18657    pub ver: u8,
18658    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18659    pub mavtype: u8,
18660    #[doc = "Memory contents at specified address"]
18661    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18662    pub value: [i8; 32],
18663}
18664impl MEMORY_VECT_DATA {
18665    pub const ENCODED_LEN: usize = 36usize;
18666    pub const DEFAULT: Self = Self {
18667        address: 0_u16,
18668        ver: 0_u8,
18669        mavtype: 0_u8,
18670        value: [0_i8; 32usize],
18671    };
18672    #[cfg(feature = "arbitrary")]
18673    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18674        use arbitrary::{Arbitrary, Unstructured};
18675        let mut buf = [0u8; 1024];
18676        rng.fill_bytes(&mut buf);
18677        let mut unstructured = Unstructured::new(&buf);
18678        Self::arbitrary(&mut unstructured).unwrap_or_default()
18679    }
18680}
18681impl Default for MEMORY_VECT_DATA {
18682    fn default() -> Self {
18683        Self::DEFAULT.clone()
18684    }
18685}
18686impl MessageData for MEMORY_VECT_DATA {
18687    type Message = MavMessage;
18688    const ID: u32 = 249u32;
18689    const NAME: &'static str = "MEMORY_VECT";
18690    const EXTRA_CRC: u8 = 204u8;
18691    const ENCODED_LEN: usize = 36usize;
18692    fn deser(
18693        _version: MavlinkVersion,
18694        __input: &[u8],
18695    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18696        let avail_len = __input.len();
18697        let mut payload_buf = [0; Self::ENCODED_LEN];
18698        let mut buf = if avail_len < Self::ENCODED_LEN {
18699            payload_buf[0..avail_len].copy_from_slice(__input);
18700            Bytes::new(&payload_buf)
18701        } else {
18702            Bytes::new(__input)
18703        };
18704        let mut __struct = Self::default();
18705        __struct.address = buf.get_u16_le();
18706        __struct.ver = buf.get_u8();
18707        __struct.mavtype = buf.get_u8();
18708        for v in &mut __struct.value {
18709            let val = buf.get_i8();
18710            *v = val;
18711        }
18712        Ok(__struct)
18713    }
18714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18715        let mut __tmp = BytesMut::new(bytes);
18716        #[allow(clippy::absurd_extreme_comparisons)]
18717        #[allow(unused_comparisons)]
18718        if __tmp.remaining() < Self::ENCODED_LEN {
18719            panic!(
18720                "buffer is too small (need {} bytes, but got {})",
18721                Self::ENCODED_LEN,
18722                __tmp.remaining(),
18723            )
18724        }
18725        __tmp.put_u16_le(self.address);
18726        __tmp.put_u8(self.ver);
18727        __tmp.put_u8(self.mavtype);
18728        for val in &self.value {
18729            __tmp.put_i8(*val);
18730        }
18731        if matches!(version, MavlinkVersion::V2) {
18732            let len = __tmp.len();
18733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18734        } else {
18735            __tmp.len()
18736        }
18737    }
18738}
18739#[doc = "id: 244"]
18740#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
18741#[derive(Debug, Clone, PartialEq)]
18742#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18743#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18744pub struct MESSAGE_INTERVAL_DATA {
18745    #[doc = "0 indicates the interval at which it is sent."]
18746    pub interval_us: i32,
18747    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
18748    pub message_id: u16,
18749}
18750impl MESSAGE_INTERVAL_DATA {
18751    pub const ENCODED_LEN: usize = 6usize;
18752    pub const DEFAULT: Self = Self {
18753        interval_us: 0_i32,
18754        message_id: 0_u16,
18755    };
18756    #[cfg(feature = "arbitrary")]
18757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18758        use arbitrary::{Arbitrary, Unstructured};
18759        let mut buf = [0u8; 1024];
18760        rng.fill_bytes(&mut buf);
18761        let mut unstructured = Unstructured::new(&buf);
18762        Self::arbitrary(&mut unstructured).unwrap_or_default()
18763    }
18764}
18765impl Default for MESSAGE_INTERVAL_DATA {
18766    fn default() -> Self {
18767        Self::DEFAULT.clone()
18768    }
18769}
18770impl MessageData for MESSAGE_INTERVAL_DATA {
18771    type Message = MavMessage;
18772    const ID: u32 = 244u32;
18773    const NAME: &'static str = "MESSAGE_INTERVAL";
18774    const EXTRA_CRC: u8 = 95u8;
18775    const ENCODED_LEN: usize = 6usize;
18776    fn deser(
18777        _version: MavlinkVersion,
18778        __input: &[u8],
18779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18780        let avail_len = __input.len();
18781        let mut payload_buf = [0; Self::ENCODED_LEN];
18782        let mut buf = if avail_len < Self::ENCODED_LEN {
18783            payload_buf[0..avail_len].copy_from_slice(__input);
18784            Bytes::new(&payload_buf)
18785        } else {
18786            Bytes::new(__input)
18787        };
18788        let mut __struct = Self::default();
18789        __struct.interval_us = buf.get_i32_le();
18790        __struct.message_id = buf.get_u16_le();
18791        Ok(__struct)
18792    }
18793    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18794        let mut __tmp = BytesMut::new(bytes);
18795        #[allow(clippy::absurd_extreme_comparisons)]
18796        #[allow(unused_comparisons)]
18797        if __tmp.remaining() < Self::ENCODED_LEN {
18798            panic!(
18799                "buffer is too small (need {} bytes, but got {})",
18800                Self::ENCODED_LEN,
18801                __tmp.remaining(),
18802            )
18803        }
18804        __tmp.put_i32_le(self.interval_us);
18805        __tmp.put_u16_le(self.message_id);
18806        if matches!(version, MavlinkVersion::V2) {
18807            let len = __tmp.len();
18808            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18809        } else {
18810            __tmp.len()
18811        }
18812    }
18813}
18814#[doc = "id: 47"]
18815#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
18816#[derive(Debug, Clone, PartialEq)]
18817#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18818#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18819pub struct MISSION_ACK_DATA {
18820    #[doc = "System ID"]
18821    pub target_system: u8,
18822    #[doc = "Component ID"]
18823    pub target_component: u8,
18824    #[doc = "Mission result."]
18825    pub mavtype: MavMissionResult,
18826    #[doc = "Mission type."]
18827    #[cfg_attr(feature = "serde", serde(default))]
18828    pub mission_type: MavMissionType,
18829    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
18830    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18831    pub opaque_id: u32,
18832}
18833impl MISSION_ACK_DATA {
18834    pub const ENCODED_LEN: usize = 8usize;
18835    pub const DEFAULT: Self = Self {
18836        target_system: 0_u8,
18837        target_component: 0_u8,
18838        mavtype: MavMissionResult::DEFAULT,
18839        mission_type: MavMissionType::DEFAULT,
18840        opaque_id: 0_u32,
18841    };
18842    #[cfg(feature = "arbitrary")]
18843    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18844        use arbitrary::{Arbitrary, Unstructured};
18845        let mut buf = [0u8; 1024];
18846        rng.fill_bytes(&mut buf);
18847        let mut unstructured = Unstructured::new(&buf);
18848        Self::arbitrary(&mut unstructured).unwrap_or_default()
18849    }
18850}
18851impl Default for MISSION_ACK_DATA {
18852    fn default() -> Self {
18853        Self::DEFAULT.clone()
18854    }
18855}
18856impl MessageData for MISSION_ACK_DATA {
18857    type Message = MavMessage;
18858    const ID: u32 = 47u32;
18859    const NAME: &'static str = "MISSION_ACK";
18860    const EXTRA_CRC: u8 = 153u8;
18861    const ENCODED_LEN: usize = 8usize;
18862    fn deser(
18863        _version: MavlinkVersion,
18864        __input: &[u8],
18865    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18866        let avail_len = __input.len();
18867        let mut payload_buf = [0; Self::ENCODED_LEN];
18868        let mut buf = if avail_len < Self::ENCODED_LEN {
18869            payload_buf[0..avail_len].copy_from_slice(__input);
18870            Bytes::new(&payload_buf)
18871        } else {
18872            Bytes::new(__input)
18873        };
18874        let mut __struct = Self::default();
18875        __struct.target_system = buf.get_u8();
18876        __struct.target_component = buf.get_u8();
18877        let tmp = buf.get_u8();
18878        __struct.mavtype =
18879            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18880                enum_type: "MavMissionResult",
18881                value: tmp as u32,
18882            })?;
18883        let tmp = buf.get_u8();
18884        __struct.mission_type =
18885            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18886                enum_type: "MavMissionType",
18887                value: tmp as u32,
18888            })?;
18889        __struct.opaque_id = buf.get_u32_le();
18890        Ok(__struct)
18891    }
18892    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18893        let mut __tmp = BytesMut::new(bytes);
18894        #[allow(clippy::absurd_extreme_comparisons)]
18895        #[allow(unused_comparisons)]
18896        if __tmp.remaining() < Self::ENCODED_LEN {
18897            panic!(
18898                "buffer is too small (need {} bytes, but got {})",
18899                Self::ENCODED_LEN,
18900                __tmp.remaining(),
18901            )
18902        }
18903        __tmp.put_u8(self.target_system);
18904        __tmp.put_u8(self.target_component);
18905        __tmp.put_u8(self.mavtype as u8);
18906        __tmp.put_u8(self.mission_type as u8);
18907        __tmp.put_u32_le(self.opaque_id);
18908        if matches!(version, MavlinkVersion::V2) {
18909            let len = __tmp.len();
18910            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18911        } else {
18912            __tmp.len()
18913        }
18914    }
18915}
18916#[doc = "id: 45"]
18917#[doc = "Delete all mission items at once."]
18918#[derive(Debug, Clone, PartialEq)]
18919#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18920#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18921pub struct MISSION_CLEAR_ALL_DATA {
18922    #[doc = "System ID"]
18923    pub target_system: u8,
18924    #[doc = "Component ID"]
18925    pub target_component: u8,
18926    #[doc = "Mission type."]
18927    #[cfg_attr(feature = "serde", serde(default))]
18928    pub mission_type: MavMissionType,
18929}
18930impl MISSION_CLEAR_ALL_DATA {
18931    pub const ENCODED_LEN: usize = 3usize;
18932    pub const DEFAULT: Self = Self {
18933        target_system: 0_u8,
18934        target_component: 0_u8,
18935        mission_type: MavMissionType::DEFAULT,
18936    };
18937    #[cfg(feature = "arbitrary")]
18938    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18939        use arbitrary::{Arbitrary, Unstructured};
18940        let mut buf = [0u8; 1024];
18941        rng.fill_bytes(&mut buf);
18942        let mut unstructured = Unstructured::new(&buf);
18943        Self::arbitrary(&mut unstructured).unwrap_or_default()
18944    }
18945}
18946impl Default for MISSION_CLEAR_ALL_DATA {
18947    fn default() -> Self {
18948        Self::DEFAULT.clone()
18949    }
18950}
18951impl MessageData for MISSION_CLEAR_ALL_DATA {
18952    type Message = MavMessage;
18953    const ID: u32 = 45u32;
18954    const NAME: &'static str = "MISSION_CLEAR_ALL";
18955    const EXTRA_CRC: u8 = 232u8;
18956    const ENCODED_LEN: usize = 3usize;
18957    fn deser(
18958        _version: MavlinkVersion,
18959        __input: &[u8],
18960    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18961        let avail_len = __input.len();
18962        let mut payload_buf = [0; Self::ENCODED_LEN];
18963        let mut buf = if avail_len < Self::ENCODED_LEN {
18964            payload_buf[0..avail_len].copy_from_slice(__input);
18965            Bytes::new(&payload_buf)
18966        } else {
18967            Bytes::new(__input)
18968        };
18969        let mut __struct = Self::default();
18970        __struct.target_system = buf.get_u8();
18971        __struct.target_component = buf.get_u8();
18972        let tmp = buf.get_u8();
18973        __struct.mission_type =
18974            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18975                enum_type: "MavMissionType",
18976                value: tmp as u32,
18977            })?;
18978        Ok(__struct)
18979    }
18980    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18981        let mut __tmp = BytesMut::new(bytes);
18982        #[allow(clippy::absurd_extreme_comparisons)]
18983        #[allow(unused_comparisons)]
18984        if __tmp.remaining() < Self::ENCODED_LEN {
18985            panic!(
18986                "buffer is too small (need {} bytes, but got {})",
18987                Self::ENCODED_LEN,
18988                __tmp.remaining(),
18989            )
18990        }
18991        __tmp.put_u8(self.target_system);
18992        __tmp.put_u8(self.target_component);
18993        __tmp.put_u8(self.mission_type as u8);
18994        if matches!(version, MavlinkVersion::V2) {
18995            let len = __tmp.len();
18996            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18997        } else {
18998            __tmp.len()
18999        }
19000    }
19001}
19002#[doc = "id: 44"]
19003#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
19004#[derive(Debug, Clone, PartialEq)]
19005#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19006#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19007pub struct MISSION_COUNT_DATA {
19008    #[doc = "Number of mission items in the sequence"]
19009    pub count: u16,
19010    #[doc = "System ID"]
19011    pub target_system: u8,
19012    #[doc = "Component ID"]
19013    pub target_component: u8,
19014    #[doc = "Mission type."]
19015    #[cfg_attr(feature = "serde", serde(default))]
19016    pub mission_type: MavMissionType,
19017    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
19018    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19019    pub opaque_id: u32,
19020}
19021impl MISSION_COUNT_DATA {
19022    pub const ENCODED_LEN: usize = 9usize;
19023    pub const DEFAULT: Self = Self {
19024        count: 0_u16,
19025        target_system: 0_u8,
19026        target_component: 0_u8,
19027        mission_type: MavMissionType::DEFAULT,
19028        opaque_id: 0_u32,
19029    };
19030    #[cfg(feature = "arbitrary")]
19031    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19032        use arbitrary::{Arbitrary, Unstructured};
19033        let mut buf = [0u8; 1024];
19034        rng.fill_bytes(&mut buf);
19035        let mut unstructured = Unstructured::new(&buf);
19036        Self::arbitrary(&mut unstructured).unwrap_or_default()
19037    }
19038}
19039impl Default for MISSION_COUNT_DATA {
19040    fn default() -> Self {
19041        Self::DEFAULT.clone()
19042    }
19043}
19044impl MessageData for MISSION_COUNT_DATA {
19045    type Message = MavMessage;
19046    const ID: u32 = 44u32;
19047    const NAME: &'static str = "MISSION_COUNT";
19048    const EXTRA_CRC: u8 = 221u8;
19049    const ENCODED_LEN: usize = 9usize;
19050    fn deser(
19051        _version: MavlinkVersion,
19052        __input: &[u8],
19053    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19054        let avail_len = __input.len();
19055        let mut payload_buf = [0; Self::ENCODED_LEN];
19056        let mut buf = if avail_len < Self::ENCODED_LEN {
19057            payload_buf[0..avail_len].copy_from_slice(__input);
19058            Bytes::new(&payload_buf)
19059        } else {
19060            Bytes::new(__input)
19061        };
19062        let mut __struct = Self::default();
19063        __struct.count = buf.get_u16_le();
19064        __struct.target_system = buf.get_u8();
19065        __struct.target_component = buf.get_u8();
19066        let tmp = buf.get_u8();
19067        __struct.mission_type =
19068            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19069                enum_type: "MavMissionType",
19070                value: tmp as u32,
19071            })?;
19072        __struct.opaque_id = buf.get_u32_le();
19073        Ok(__struct)
19074    }
19075    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19076        let mut __tmp = BytesMut::new(bytes);
19077        #[allow(clippy::absurd_extreme_comparisons)]
19078        #[allow(unused_comparisons)]
19079        if __tmp.remaining() < Self::ENCODED_LEN {
19080            panic!(
19081                "buffer is too small (need {} bytes, but got {})",
19082                Self::ENCODED_LEN,
19083                __tmp.remaining(),
19084            )
19085        }
19086        __tmp.put_u16_le(self.count);
19087        __tmp.put_u8(self.target_system);
19088        __tmp.put_u8(self.target_component);
19089        __tmp.put_u8(self.mission_type as u8);
19090        __tmp.put_u32_le(self.opaque_id);
19091        if matches!(version, MavlinkVersion::V2) {
19092            let len = __tmp.len();
19093            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19094        } else {
19095            __tmp.len()
19096        }
19097    }
19098}
19099#[doc = "id: 42"]
19100#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
19101#[derive(Debug, Clone, PartialEq)]
19102#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19103#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19104pub struct MISSION_CURRENT_DATA {
19105    #[doc = "Sequence"]
19106    pub seq: u16,
19107    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
19108    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19109    pub total: u16,
19110    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
19111    #[cfg_attr(feature = "serde", serde(default))]
19112    pub mission_state: MissionState,
19113    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
19114    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19115    pub mission_mode: u8,
19116    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
19117    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19118    pub mission_id: u32,
19119    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
19120    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19121    pub fence_id: u32,
19122    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
19123    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19124    pub rally_points_id: u32,
19125}
19126impl MISSION_CURRENT_DATA {
19127    pub const ENCODED_LEN: usize = 18usize;
19128    pub const DEFAULT: Self = Self {
19129        seq: 0_u16,
19130        total: 0_u16,
19131        mission_state: MissionState::DEFAULT,
19132        mission_mode: 0_u8,
19133        mission_id: 0_u32,
19134        fence_id: 0_u32,
19135        rally_points_id: 0_u32,
19136    };
19137    #[cfg(feature = "arbitrary")]
19138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19139        use arbitrary::{Arbitrary, Unstructured};
19140        let mut buf = [0u8; 1024];
19141        rng.fill_bytes(&mut buf);
19142        let mut unstructured = Unstructured::new(&buf);
19143        Self::arbitrary(&mut unstructured).unwrap_or_default()
19144    }
19145}
19146impl Default for MISSION_CURRENT_DATA {
19147    fn default() -> Self {
19148        Self::DEFAULT.clone()
19149    }
19150}
19151impl MessageData for MISSION_CURRENT_DATA {
19152    type Message = MavMessage;
19153    const ID: u32 = 42u32;
19154    const NAME: &'static str = "MISSION_CURRENT";
19155    const EXTRA_CRC: u8 = 28u8;
19156    const ENCODED_LEN: usize = 18usize;
19157    fn deser(
19158        _version: MavlinkVersion,
19159        __input: &[u8],
19160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19161        let avail_len = __input.len();
19162        let mut payload_buf = [0; Self::ENCODED_LEN];
19163        let mut buf = if avail_len < Self::ENCODED_LEN {
19164            payload_buf[0..avail_len].copy_from_slice(__input);
19165            Bytes::new(&payload_buf)
19166        } else {
19167            Bytes::new(__input)
19168        };
19169        let mut __struct = Self::default();
19170        __struct.seq = buf.get_u16_le();
19171        __struct.total = buf.get_u16_le();
19172        let tmp = buf.get_u8();
19173        __struct.mission_state =
19174            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19175                enum_type: "MissionState",
19176                value: tmp as u32,
19177            })?;
19178        __struct.mission_mode = buf.get_u8();
19179        __struct.mission_id = buf.get_u32_le();
19180        __struct.fence_id = buf.get_u32_le();
19181        __struct.rally_points_id = buf.get_u32_le();
19182        Ok(__struct)
19183    }
19184    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19185        let mut __tmp = BytesMut::new(bytes);
19186        #[allow(clippy::absurd_extreme_comparisons)]
19187        #[allow(unused_comparisons)]
19188        if __tmp.remaining() < Self::ENCODED_LEN {
19189            panic!(
19190                "buffer is too small (need {} bytes, but got {})",
19191                Self::ENCODED_LEN,
19192                __tmp.remaining(),
19193            )
19194        }
19195        __tmp.put_u16_le(self.seq);
19196        __tmp.put_u16_le(self.total);
19197        __tmp.put_u8(self.mission_state as u8);
19198        __tmp.put_u8(self.mission_mode);
19199        __tmp.put_u32_le(self.mission_id);
19200        __tmp.put_u32_le(self.fence_id);
19201        __tmp.put_u32_le(self.rally_points_id);
19202        if matches!(version, MavlinkVersion::V2) {
19203            let len = __tmp.len();
19204            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19205        } else {
19206            __tmp.len()
19207        }
19208    }
19209}
19210#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
19211#[doc = "id: 39"]
19212#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19213#[derive(Debug, Clone, PartialEq)]
19214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19216pub struct MISSION_ITEM_DATA {
19217    #[doc = "PARAM1, see MAV_CMD enum"]
19218    pub param1: f32,
19219    #[doc = "PARAM2, see MAV_CMD enum"]
19220    pub param2: f32,
19221    #[doc = "PARAM3, see MAV_CMD enum"]
19222    pub param3: f32,
19223    #[doc = "PARAM4, see MAV_CMD enum"]
19224    pub param4: f32,
19225    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
19226    pub x: f32,
19227    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
19228    pub y: f32,
19229    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
19230    pub z: f32,
19231    #[doc = "Sequence"]
19232    pub seq: u16,
19233    #[doc = "The scheduled action for the waypoint."]
19234    pub command: MavCmd,
19235    #[doc = "System ID"]
19236    pub target_system: u8,
19237    #[doc = "Component ID"]
19238    pub target_component: u8,
19239    #[doc = "The coordinate system of the waypoint."]
19240    pub frame: MavFrame,
19241    #[doc = "false:0, true:1"]
19242    pub current: u8,
19243    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19244    pub autocontinue: u8,
19245    #[doc = "Mission type."]
19246    #[cfg_attr(feature = "serde", serde(default))]
19247    pub mission_type: MavMissionType,
19248}
19249impl MISSION_ITEM_DATA {
19250    pub const ENCODED_LEN: usize = 38usize;
19251    pub const DEFAULT: Self = Self {
19252        param1: 0.0_f32,
19253        param2: 0.0_f32,
19254        param3: 0.0_f32,
19255        param4: 0.0_f32,
19256        x: 0.0_f32,
19257        y: 0.0_f32,
19258        z: 0.0_f32,
19259        seq: 0_u16,
19260        command: MavCmd::DEFAULT,
19261        target_system: 0_u8,
19262        target_component: 0_u8,
19263        frame: MavFrame::DEFAULT,
19264        current: 0_u8,
19265        autocontinue: 0_u8,
19266        mission_type: MavMissionType::DEFAULT,
19267    };
19268    #[cfg(feature = "arbitrary")]
19269    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19270        use arbitrary::{Arbitrary, Unstructured};
19271        let mut buf = [0u8; 1024];
19272        rng.fill_bytes(&mut buf);
19273        let mut unstructured = Unstructured::new(&buf);
19274        Self::arbitrary(&mut unstructured).unwrap_or_default()
19275    }
19276}
19277impl Default for MISSION_ITEM_DATA {
19278    fn default() -> Self {
19279        Self::DEFAULT.clone()
19280    }
19281}
19282impl MessageData for MISSION_ITEM_DATA {
19283    type Message = MavMessage;
19284    const ID: u32 = 39u32;
19285    const NAME: &'static str = "MISSION_ITEM";
19286    const EXTRA_CRC: u8 = 254u8;
19287    const ENCODED_LEN: usize = 38usize;
19288    fn deser(
19289        _version: MavlinkVersion,
19290        __input: &[u8],
19291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19292        let avail_len = __input.len();
19293        let mut payload_buf = [0; Self::ENCODED_LEN];
19294        let mut buf = if avail_len < Self::ENCODED_LEN {
19295            payload_buf[0..avail_len].copy_from_slice(__input);
19296            Bytes::new(&payload_buf)
19297        } else {
19298            Bytes::new(__input)
19299        };
19300        let mut __struct = Self::default();
19301        __struct.param1 = buf.get_f32_le();
19302        __struct.param2 = buf.get_f32_le();
19303        __struct.param3 = buf.get_f32_le();
19304        __struct.param4 = buf.get_f32_le();
19305        __struct.x = buf.get_f32_le();
19306        __struct.y = buf.get_f32_le();
19307        __struct.z = buf.get_f32_le();
19308        __struct.seq = buf.get_u16_le();
19309        let tmp = buf.get_u16_le();
19310        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19311            ::mavlink_core::error::ParserError::InvalidEnum {
19312                enum_type: "MavCmd",
19313                value: tmp as u32,
19314            },
19315        )?;
19316        __struct.target_system = buf.get_u8();
19317        __struct.target_component = buf.get_u8();
19318        let tmp = buf.get_u8();
19319        __struct.frame =
19320            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19321                enum_type: "MavFrame",
19322                value: tmp as u32,
19323            })?;
19324        __struct.current = buf.get_u8();
19325        __struct.autocontinue = buf.get_u8();
19326        let tmp = buf.get_u8();
19327        __struct.mission_type =
19328            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19329                enum_type: "MavMissionType",
19330                value: tmp as u32,
19331            })?;
19332        Ok(__struct)
19333    }
19334    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19335        let mut __tmp = BytesMut::new(bytes);
19336        #[allow(clippy::absurd_extreme_comparisons)]
19337        #[allow(unused_comparisons)]
19338        if __tmp.remaining() < Self::ENCODED_LEN {
19339            panic!(
19340                "buffer is too small (need {} bytes, but got {})",
19341                Self::ENCODED_LEN,
19342                __tmp.remaining(),
19343            )
19344        }
19345        __tmp.put_f32_le(self.param1);
19346        __tmp.put_f32_le(self.param2);
19347        __tmp.put_f32_le(self.param3);
19348        __tmp.put_f32_le(self.param4);
19349        __tmp.put_f32_le(self.x);
19350        __tmp.put_f32_le(self.y);
19351        __tmp.put_f32_le(self.z);
19352        __tmp.put_u16_le(self.seq);
19353        __tmp.put_u16_le(self.command as u16);
19354        __tmp.put_u8(self.target_system);
19355        __tmp.put_u8(self.target_component);
19356        __tmp.put_u8(self.frame as u8);
19357        __tmp.put_u8(self.current);
19358        __tmp.put_u8(self.autocontinue);
19359        __tmp.put_u8(self.mission_type as u8);
19360        if matches!(version, MavlinkVersion::V2) {
19361            let len = __tmp.len();
19362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19363        } else {
19364            __tmp.len()
19365        }
19366    }
19367}
19368#[doc = "id: 73"]
19369#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19370#[derive(Debug, Clone, PartialEq)]
19371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19373pub struct MISSION_ITEM_INT_DATA {
19374    #[doc = "PARAM1, see MAV_CMD enum"]
19375    pub param1: f32,
19376    #[doc = "PARAM2, see MAV_CMD enum"]
19377    pub param2: f32,
19378    #[doc = "PARAM3, see MAV_CMD enum"]
19379    pub param3: f32,
19380    #[doc = "PARAM4, see MAV_CMD enum"]
19381    pub param4: f32,
19382    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19383    pub x: i32,
19384    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19385    pub y: i32,
19386    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19387    pub z: f32,
19388    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19389    pub seq: u16,
19390    #[doc = "The scheduled action for the waypoint."]
19391    pub command: MavCmd,
19392    #[doc = "System ID"]
19393    pub target_system: u8,
19394    #[doc = "Component ID"]
19395    pub target_component: u8,
19396    #[doc = "The coordinate system of the waypoint."]
19397    pub frame: MavFrame,
19398    #[doc = "false:0, true:1"]
19399    pub current: u8,
19400    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19401    pub autocontinue: u8,
19402    #[doc = "Mission type."]
19403    #[cfg_attr(feature = "serde", serde(default))]
19404    pub mission_type: MavMissionType,
19405}
19406impl MISSION_ITEM_INT_DATA {
19407    pub const ENCODED_LEN: usize = 38usize;
19408    pub const DEFAULT: Self = Self {
19409        param1: 0.0_f32,
19410        param2: 0.0_f32,
19411        param3: 0.0_f32,
19412        param4: 0.0_f32,
19413        x: 0_i32,
19414        y: 0_i32,
19415        z: 0.0_f32,
19416        seq: 0_u16,
19417        command: MavCmd::DEFAULT,
19418        target_system: 0_u8,
19419        target_component: 0_u8,
19420        frame: MavFrame::DEFAULT,
19421        current: 0_u8,
19422        autocontinue: 0_u8,
19423        mission_type: MavMissionType::DEFAULT,
19424    };
19425    #[cfg(feature = "arbitrary")]
19426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19427        use arbitrary::{Arbitrary, Unstructured};
19428        let mut buf = [0u8; 1024];
19429        rng.fill_bytes(&mut buf);
19430        let mut unstructured = Unstructured::new(&buf);
19431        Self::arbitrary(&mut unstructured).unwrap_or_default()
19432    }
19433}
19434impl Default for MISSION_ITEM_INT_DATA {
19435    fn default() -> Self {
19436        Self::DEFAULT.clone()
19437    }
19438}
19439impl MessageData for MISSION_ITEM_INT_DATA {
19440    type Message = MavMessage;
19441    const ID: u32 = 73u32;
19442    const NAME: &'static str = "MISSION_ITEM_INT";
19443    const EXTRA_CRC: u8 = 38u8;
19444    const ENCODED_LEN: usize = 38usize;
19445    fn deser(
19446        _version: MavlinkVersion,
19447        __input: &[u8],
19448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19449        let avail_len = __input.len();
19450        let mut payload_buf = [0; Self::ENCODED_LEN];
19451        let mut buf = if avail_len < Self::ENCODED_LEN {
19452            payload_buf[0..avail_len].copy_from_slice(__input);
19453            Bytes::new(&payload_buf)
19454        } else {
19455            Bytes::new(__input)
19456        };
19457        let mut __struct = Self::default();
19458        __struct.param1 = buf.get_f32_le();
19459        __struct.param2 = buf.get_f32_le();
19460        __struct.param3 = buf.get_f32_le();
19461        __struct.param4 = buf.get_f32_le();
19462        __struct.x = buf.get_i32_le();
19463        __struct.y = buf.get_i32_le();
19464        __struct.z = buf.get_f32_le();
19465        __struct.seq = buf.get_u16_le();
19466        let tmp = buf.get_u16_le();
19467        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19468            ::mavlink_core::error::ParserError::InvalidEnum {
19469                enum_type: "MavCmd",
19470                value: tmp as u32,
19471            },
19472        )?;
19473        __struct.target_system = buf.get_u8();
19474        __struct.target_component = buf.get_u8();
19475        let tmp = buf.get_u8();
19476        __struct.frame =
19477            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19478                enum_type: "MavFrame",
19479                value: tmp as u32,
19480            })?;
19481        __struct.current = buf.get_u8();
19482        __struct.autocontinue = buf.get_u8();
19483        let tmp = buf.get_u8();
19484        __struct.mission_type =
19485            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19486                enum_type: "MavMissionType",
19487                value: tmp as u32,
19488            })?;
19489        Ok(__struct)
19490    }
19491    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19492        let mut __tmp = BytesMut::new(bytes);
19493        #[allow(clippy::absurd_extreme_comparisons)]
19494        #[allow(unused_comparisons)]
19495        if __tmp.remaining() < Self::ENCODED_LEN {
19496            panic!(
19497                "buffer is too small (need {} bytes, but got {})",
19498                Self::ENCODED_LEN,
19499                __tmp.remaining(),
19500            )
19501        }
19502        __tmp.put_f32_le(self.param1);
19503        __tmp.put_f32_le(self.param2);
19504        __tmp.put_f32_le(self.param3);
19505        __tmp.put_f32_le(self.param4);
19506        __tmp.put_i32_le(self.x);
19507        __tmp.put_i32_le(self.y);
19508        __tmp.put_f32_le(self.z);
19509        __tmp.put_u16_le(self.seq);
19510        __tmp.put_u16_le(self.command as u16);
19511        __tmp.put_u8(self.target_system);
19512        __tmp.put_u8(self.target_component);
19513        __tmp.put_u8(self.frame as u8);
19514        __tmp.put_u8(self.current);
19515        __tmp.put_u8(self.autocontinue);
19516        __tmp.put_u8(self.mission_type as u8);
19517        if matches!(version, MavlinkVersion::V2) {
19518            let len = __tmp.len();
19519            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19520        } else {
19521            __tmp.len()
19522        }
19523    }
19524}
19525#[doc = "id: 46"]
19526#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19527#[derive(Debug, Clone, PartialEq)]
19528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19530pub struct MISSION_ITEM_REACHED_DATA {
19531    #[doc = "Sequence"]
19532    pub seq: u16,
19533}
19534impl MISSION_ITEM_REACHED_DATA {
19535    pub const ENCODED_LEN: usize = 2usize;
19536    pub const DEFAULT: Self = Self { seq: 0_u16 };
19537    #[cfg(feature = "arbitrary")]
19538    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19539        use arbitrary::{Arbitrary, Unstructured};
19540        let mut buf = [0u8; 1024];
19541        rng.fill_bytes(&mut buf);
19542        let mut unstructured = Unstructured::new(&buf);
19543        Self::arbitrary(&mut unstructured).unwrap_or_default()
19544    }
19545}
19546impl Default for MISSION_ITEM_REACHED_DATA {
19547    fn default() -> Self {
19548        Self::DEFAULT.clone()
19549    }
19550}
19551impl MessageData for MISSION_ITEM_REACHED_DATA {
19552    type Message = MavMessage;
19553    const ID: u32 = 46u32;
19554    const NAME: &'static str = "MISSION_ITEM_REACHED";
19555    const EXTRA_CRC: u8 = 11u8;
19556    const ENCODED_LEN: usize = 2usize;
19557    fn deser(
19558        _version: MavlinkVersion,
19559        __input: &[u8],
19560    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19561        let avail_len = __input.len();
19562        let mut payload_buf = [0; Self::ENCODED_LEN];
19563        let mut buf = if avail_len < Self::ENCODED_LEN {
19564            payload_buf[0..avail_len].copy_from_slice(__input);
19565            Bytes::new(&payload_buf)
19566        } else {
19567            Bytes::new(__input)
19568        };
19569        let mut __struct = Self::default();
19570        __struct.seq = buf.get_u16_le();
19571        Ok(__struct)
19572    }
19573    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19574        let mut __tmp = BytesMut::new(bytes);
19575        #[allow(clippy::absurd_extreme_comparisons)]
19576        #[allow(unused_comparisons)]
19577        if __tmp.remaining() < Self::ENCODED_LEN {
19578            panic!(
19579                "buffer is too small (need {} bytes, but got {})",
19580                Self::ENCODED_LEN,
19581                __tmp.remaining(),
19582            )
19583        }
19584        __tmp.put_u16_le(self.seq);
19585        if matches!(version, MavlinkVersion::V2) {
19586            let len = __tmp.len();
19587            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19588        } else {
19589            __tmp.len()
19590        }
19591    }
19592}
19593#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19594#[doc = "id: 40"]
19595#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19596#[derive(Debug, Clone, PartialEq)]
19597#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19598#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19599pub struct MISSION_REQUEST_DATA {
19600    #[doc = "Sequence"]
19601    pub seq: u16,
19602    #[doc = "System ID"]
19603    pub target_system: u8,
19604    #[doc = "Component ID"]
19605    pub target_component: u8,
19606    #[doc = "Mission type."]
19607    #[cfg_attr(feature = "serde", serde(default))]
19608    pub mission_type: MavMissionType,
19609}
19610impl MISSION_REQUEST_DATA {
19611    pub const ENCODED_LEN: usize = 5usize;
19612    pub const DEFAULT: Self = Self {
19613        seq: 0_u16,
19614        target_system: 0_u8,
19615        target_component: 0_u8,
19616        mission_type: MavMissionType::DEFAULT,
19617    };
19618    #[cfg(feature = "arbitrary")]
19619    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19620        use arbitrary::{Arbitrary, Unstructured};
19621        let mut buf = [0u8; 1024];
19622        rng.fill_bytes(&mut buf);
19623        let mut unstructured = Unstructured::new(&buf);
19624        Self::arbitrary(&mut unstructured).unwrap_or_default()
19625    }
19626}
19627impl Default for MISSION_REQUEST_DATA {
19628    fn default() -> Self {
19629        Self::DEFAULT.clone()
19630    }
19631}
19632impl MessageData for MISSION_REQUEST_DATA {
19633    type Message = MavMessage;
19634    const ID: u32 = 40u32;
19635    const NAME: &'static str = "MISSION_REQUEST";
19636    const EXTRA_CRC: u8 = 230u8;
19637    const ENCODED_LEN: usize = 5usize;
19638    fn deser(
19639        _version: MavlinkVersion,
19640        __input: &[u8],
19641    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19642        let avail_len = __input.len();
19643        let mut payload_buf = [0; Self::ENCODED_LEN];
19644        let mut buf = if avail_len < Self::ENCODED_LEN {
19645            payload_buf[0..avail_len].copy_from_slice(__input);
19646            Bytes::new(&payload_buf)
19647        } else {
19648            Bytes::new(__input)
19649        };
19650        let mut __struct = Self::default();
19651        __struct.seq = buf.get_u16_le();
19652        __struct.target_system = buf.get_u8();
19653        __struct.target_component = buf.get_u8();
19654        let tmp = buf.get_u8();
19655        __struct.mission_type =
19656            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19657                enum_type: "MavMissionType",
19658                value: tmp as u32,
19659            })?;
19660        Ok(__struct)
19661    }
19662    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19663        let mut __tmp = BytesMut::new(bytes);
19664        #[allow(clippy::absurd_extreme_comparisons)]
19665        #[allow(unused_comparisons)]
19666        if __tmp.remaining() < Self::ENCODED_LEN {
19667            panic!(
19668                "buffer is too small (need {} bytes, but got {})",
19669                Self::ENCODED_LEN,
19670                __tmp.remaining(),
19671            )
19672        }
19673        __tmp.put_u16_le(self.seq);
19674        __tmp.put_u8(self.target_system);
19675        __tmp.put_u8(self.target_component);
19676        __tmp.put_u8(self.mission_type as u8);
19677        if matches!(version, MavlinkVersion::V2) {
19678            let len = __tmp.len();
19679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19680        } else {
19681            __tmp.len()
19682        }
19683    }
19684}
19685#[doc = "id: 51"]
19686#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
19687#[derive(Debug, Clone, PartialEq)]
19688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19690pub struct MISSION_REQUEST_INT_DATA {
19691    #[doc = "Sequence"]
19692    pub seq: u16,
19693    #[doc = "System ID"]
19694    pub target_system: u8,
19695    #[doc = "Component ID"]
19696    pub target_component: u8,
19697    #[doc = "Mission type."]
19698    #[cfg_attr(feature = "serde", serde(default))]
19699    pub mission_type: MavMissionType,
19700}
19701impl MISSION_REQUEST_INT_DATA {
19702    pub const ENCODED_LEN: usize = 5usize;
19703    pub const DEFAULT: Self = Self {
19704        seq: 0_u16,
19705        target_system: 0_u8,
19706        target_component: 0_u8,
19707        mission_type: MavMissionType::DEFAULT,
19708    };
19709    #[cfg(feature = "arbitrary")]
19710    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19711        use arbitrary::{Arbitrary, Unstructured};
19712        let mut buf = [0u8; 1024];
19713        rng.fill_bytes(&mut buf);
19714        let mut unstructured = Unstructured::new(&buf);
19715        Self::arbitrary(&mut unstructured).unwrap_or_default()
19716    }
19717}
19718impl Default for MISSION_REQUEST_INT_DATA {
19719    fn default() -> Self {
19720        Self::DEFAULT.clone()
19721    }
19722}
19723impl MessageData for MISSION_REQUEST_INT_DATA {
19724    type Message = MavMessage;
19725    const ID: u32 = 51u32;
19726    const NAME: &'static str = "MISSION_REQUEST_INT";
19727    const EXTRA_CRC: u8 = 196u8;
19728    const ENCODED_LEN: usize = 5usize;
19729    fn deser(
19730        _version: MavlinkVersion,
19731        __input: &[u8],
19732    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19733        let avail_len = __input.len();
19734        let mut payload_buf = [0; Self::ENCODED_LEN];
19735        let mut buf = if avail_len < Self::ENCODED_LEN {
19736            payload_buf[0..avail_len].copy_from_slice(__input);
19737            Bytes::new(&payload_buf)
19738        } else {
19739            Bytes::new(__input)
19740        };
19741        let mut __struct = Self::default();
19742        __struct.seq = buf.get_u16_le();
19743        __struct.target_system = buf.get_u8();
19744        __struct.target_component = buf.get_u8();
19745        let tmp = buf.get_u8();
19746        __struct.mission_type =
19747            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19748                enum_type: "MavMissionType",
19749                value: tmp as u32,
19750            })?;
19751        Ok(__struct)
19752    }
19753    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19754        let mut __tmp = BytesMut::new(bytes);
19755        #[allow(clippy::absurd_extreme_comparisons)]
19756        #[allow(unused_comparisons)]
19757        if __tmp.remaining() < Self::ENCODED_LEN {
19758            panic!(
19759                "buffer is too small (need {} bytes, but got {})",
19760                Self::ENCODED_LEN,
19761                __tmp.remaining(),
19762            )
19763        }
19764        __tmp.put_u16_le(self.seq);
19765        __tmp.put_u8(self.target_system);
19766        __tmp.put_u8(self.target_component);
19767        __tmp.put_u8(self.mission_type as u8);
19768        if matches!(version, MavlinkVersion::V2) {
19769            let len = __tmp.len();
19770            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19771        } else {
19772            __tmp.len()
19773        }
19774    }
19775}
19776#[doc = "id: 43"]
19777#[doc = "Request the overall list of mission items from the system/component."]
19778#[derive(Debug, Clone, PartialEq)]
19779#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19780#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19781pub struct MISSION_REQUEST_LIST_DATA {
19782    #[doc = "System ID"]
19783    pub target_system: u8,
19784    #[doc = "Component ID"]
19785    pub target_component: u8,
19786    #[doc = "Mission type."]
19787    #[cfg_attr(feature = "serde", serde(default))]
19788    pub mission_type: MavMissionType,
19789}
19790impl MISSION_REQUEST_LIST_DATA {
19791    pub const ENCODED_LEN: usize = 3usize;
19792    pub const DEFAULT: Self = Self {
19793        target_system: 0_u8,
19794        target_component: 0_u8,
19795        mission_type: MavMissionType::DEFAULT,
19796    };
19797    #[cfg(feature = "arbitrary")]
19798    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19799        use arbitrary::{Arbitrary, Unstructured};
19800        let mut buf = [0u8; 1024];
19801        rng.fill_bytes(&mut buf);
19802        let mut unstructured = Unstructured::new(&buf);
19803        Self::arbitrary(&mut unstructured).unwrap_or_default()
19804    }
19805}
19806impl Default for MISSION_REQUEST_LIST_DATA {
19807    fn default() -> Self {
19808        Self::DEFAULT.clone()
19809    }
19810}
19811impl MessageData for MISSION_REQUEST_LIST_DATA {
19812    type Message = MavMessage;
19813    const ID: u32 = 43u32;
19814    const NAME: &'static str = "MISSION_REQUEST_LIST";
19815    const EXTRA_CRC: u8 = 132u8;
19816    const ENCODED_LEN: usize = 3usize;
19817    fn deser(
19818        _version: MavlinkVersion,
19819        __input: &[u8],
19820    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19821        let avail_len = __input.len();
19822        let mut payload_buf = [0; Self::ENCODED_LEN];
19823        let mut buf = if avail_len < Self::ENCODED_LEN {
19824            payload_buf[0..avail_len].copy_from_slice(__input);
19825            Bytes::new(&payload_buf)
19826        } else {
19827            Bytes::new(__input)
19828        };
19829        let mut __struct = Self::default();
19830        __struct.target_system = buf.get_u8();
19831        __struct.target_component = buf.get_u8();
19832        let tmp = buf.get_u8();
19833        __struct.mission_type =
19834            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19835                enum_type: "MavMissionType",
19836                value: tmp as u32,
19837            })?;
19838        Ok(__struct)
19839    }
19840    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19841        let mut __tmp = BytesMut::new(bytes);
19842        #[allow(clippy::absurd_extreme_comparisons)]
19843        #[allow(unused_comparisons)]
19844        if __tmp.remaining() < Self::ENCODED_LEN {
19845            panic!(
19846                "buffer is too small (need {} bytes, but got {})",
19847                Self::ENCODED_LEN,
19848                __tmp.remaining(),
19849            )
19850        }
19851        __tmp.put_u8(self.target_system);
19852        __tmp.put_u8(self.target_component);
19853        __tmp.put_u8(self.mission_type as u8);
19854        if matches!(version, MavlinkVersion::V2) {
19855            let len = __tmp.len();
19856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19857        } else {
19858            __tmp.len()
19859        }
19860    }
19861}
19862#[doc = "id: 37"]
19863#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
19864#[derive(Debug, Clone, PartialEq)]
19865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19867pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
19868    #[doc = "Start index"]
19869    pub start_index: i16,
19870    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
19871    pub end_index: i16,
19872    #[doc = "System ID"]
19873    pub target_system: u8,
19874    #[doc = "Component ID"]
19875    pub target_component: u8,
19876    #[doc = "Mission type."]
19877    #[cfg_attr(feature = "serde", serde(default))]
19878    pub mission_type: MavMissionType,
19879}
19880impl MISSION_REQUEST_PARTIAL_LIST_DATA {
19881    pub const ENCODED_LEN: usize = 7usize;
19882    pub const DEFAULT: Self = Self {
19883        start_index: 0_i16,
19884        end_index: 0_i16,
19885        target_system: 0_u8,
19886        target_component: 0_u8,
19887        mission_type: MavMissionType::DEFAULT,
19888    };
19889    #[cfg(feature = "arbitrary")]
19890    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19891        use arbitrary::{Arbitrary, Unstructured};
19892        let mut buf = [0u8; 1024];
19893        rng.fill_bytes(&mut buf);
19894        let mut unstructured = Unstructured::new(&buf);
19895        Self::arbitrary(&mut unstructured).unwrap_or_default()
19896    }
19897}
19898impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
19899    fn default() -> Self {
19900        Self::DEFAULT.clone()
19901    }
19902}
19903impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
19904    type Message = MavMessage;
19905    const ID: u32 = 37u32;
19906    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
19907    const EXTRA_CRC: u8 = 212u8;
19908    const ENCODED_LEN: usize = 7usize;
19909    fn deser(
19910        _version: MavlinkVersion,
19911        __input: &[u8],
19912    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19913        let avail_len = __input.len();
19914        let mut payload_buf = [0; Self::ENCODED_LEN];
19915        let mut buf = if avail_len < Self::ENCODED_LEN {
19916            payload_buf[0..avail_len].copy_from_slice(__input);
19917            Bytes::new(&payload_buf)
19918        } else {
19919            Bytes::new(__input)
19920        };
19921        let mut __struct = Self::default();
19922        __struct.start_index = buf.get_i16_le();
19923        __struct.end_index = buf.get_i16_le();
19924        __struct.target_system = buf.get_u8();
19925        __struct.target_component = buf.get_u8();
19926        let tmp = buf.get_u8();
19927        __struct.mission_type =
19928            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19929                enum_type: "MavMissionType",
19930                value: tmp as u32,
19931            })?;
19932        Ok(__struct)
19933    }
19934    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19935        let mut __tmp = BytesMut::new(bytes);
19936        #[allow(clippy::absurd_extreme_comparisons)]
19937        #[allow(unused_comparisons)]
19938        if __tmp.remaining() < Self::ENCODED_LEN {
19939            panic!(
19940                "buffer is too small (need {} bytes, but got {})",
19941                Self::ENCODED_LEN,
19942                __tmp.remaining(),
19943            )
19944        }
19945        __tmp.put_i16_le(self.start_index);
19946        __tmp.put_i16_le(self.end_index);
19947        __tmp.put_u8(self.target_system);
19948        __tmp.put_u8(self.target_component);
19949        __tmp.put_u8(self.mission_type as u8);
19950        if matches!(version, MavlinkVersion::V2) {
19951            let len = __tmp.len();
19952            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19953        } else {
19954            __tmp.len()
19955        }
19956    }
19957}
19958#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
19959#[doc = "id: 41"]
19960#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
19961#[derive(Debug, Clone, PartialEq)]
19962#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19963#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19964pub struct MISSION_SET_CURRENT_DATA {
19965    #[doc = "Sequence"]
19966    pub seq: u16,
19967    #[doc = "System ID"]
19968    pub target_system: u8,
19969    #[doc = "Component ID"]
19970    pub target_component: u8,
19971}
19972impl MISSION_SET_CURRENT_DATA {
19973    pub const ENCODED_LEN: usize = 4usize;
19974    pub const DEFAULT: Self = Self {
19975        seq: 0_u16,
19976        target_system: 0_u8,
19977        target_component: 0_u8,
19978    };
19979    #[cfg(feature = "arbitrary")]
19980    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19981        use arbitrary::{Arbitrary, Unstructured};
19982        let mut buf = [0u8; 1024];
19983        rng.fill_bytes(&mut buf);
19984        let mut unstructured = Unstructured::new(&buf);
19985        Self::arbitrary(&mut unstructured).unwrap_or_default()
19986    }
19987}
19988impl Default for MISSION_SET_CURRENT_DATA {
19989    fn default() -> Self {
19990        Self::DEFAULT.clone()
19991    }
19992}
19993impl MessageData for MISSION_SET_CURRENT_DATA {
19994    type Message = MavMessage;
19995    const ID: u32 = 41u32;
19996    const NAME: &'static str = "MISSION_SET_CURRENT";
19997    const EXTRA_CRC: u8 = 28u8;
19998    const ENCODED_LEN: usize = 4usize;
19999    fn deser(
20000        _version: MavlinkVersion,
20001        __input: &[u8],
20002    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20003        let avail_len = __input.len();
20004        let mut payload_buf = [0; Self::ENCODED_LEN];
20005        let mut buf = if avail_len < Self::ENCODED_LEN {
20006            payload_buf[0..avail_len].copy_from_slice(__input);
20007            Bytes::new(&payload_buf)
20008        } else {
20009            Bytes::new(__input)
20010        };
20011        let mut __struct = Self::default();
20012        __struct.seq = buf.get_u16_le();
20013        __struct.target_system = buf.get_u8();
20014        __struct.target_component = buf.get_u8();
20015        Ok(__struct)
20016    }
20017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20018        let mut __tmp = BytesMut::new(bytes);
20019        #[allow(clippy::absurd_extreme_comparisons)]
20020        #[allow(unused_comparisons)]
20021        if __tmp.remaining() < Self::ENCODED_LEN {
20022            panic!(
20023                "buffer is too small (need {} bytes, but got {})",
20024                Self::ENCODED_LEN,
20025                __tmp.remaining(),
20026            )
20027        }
20028        __tmp.put_u16_le(self.seq);
20029        __tmp.put_u8(self.target_system);
20030        __tmp.put_u8(self.target_component);
20031        if matches!(version, MavlinkVersion::V2) {
20032            let len = __tmp.len();
20033            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20034        } else {
20035            __tmp.len()
20036        }
20037    }
20038}
20039#[doc = "id: 38"]
20040#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
20041#[derive(Debug, Clone, PartialEq)]
20042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20043#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20044pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
20045    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
20046    pub start_index: i16,
20047    #[doc = "End index, equal or greater than start index."]
20048    pub end_index: i16,
20049    #[doc = "System ID"]
20050    pub target_system: u8,
20051    #[doc = "Component ID"]
20052    pub target_component: u8,
20053    #[doc = "Mission type."]
20054    #[cfg_attr(feature = "serde", serde(default))]
20055    pub mission_type: MavMissionType,
20056}
20057impl MISSION_WRITE_PARTIAL_LIST_DATA {
20058    pub const ENCODED_LEN: usize = 7usize;
20059    pub const DEFAULT: Self = Self {
20060        start_index: 0_i16,
20061        end_index: 0_i16,
20062        target_system: 0_u8,
20063        target_component: 0_u8,
20064        mission_type: MavMissionType::DEFAULT,
20065    };
20066    #[cfg(feature = "arbitrary")]
20067    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20068        use arbitrary::{Arbitrary, Unstructured};
20069        let mut buf = [0u8; 1024];
20070        rng.fill_bytes(&mut buf);
20071        let mut unstructured = Unstructured::new(&buf);
20072        Self::arbitrary(&mut unstructured).unwrap_or_default()
20073    }
20074}
20075impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
20076    fn default() -> Self {
20077        Self::DEFAULT.clone()
20078    }
20079}
20080impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
20081    type Message = MavMessage;
20082    const ID: u32 = 38u32;
20083    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
20084    const EXTRA_CRC: u8 = 9u8;
20085    const ENCODED_LEN: usize = 7usize;
20086    fn deser(
20087        _version: MavlinkVersion,
20088        __input: &[u8],
20089    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20090        let avail_len = __input.len();
20091        let mut payload_buf = [0; Self::ENCODED_LEN];
20092        let mut buf = if avail_len < Self::ENCODED_LEN {
20093            payload_buf[0..avail_len].copy_from_slice(__input);
20094            Bytes::new(&payload_buf)
20095        } else {
20096            Bytes::new(__input)
20097        };
20098        let mut __struct = Self::default();
20099        __struct.start_index = buf.get_i16_le();
20100        __struct.end_index = buf.get_i16_le();
20101        __struct.target_system = buf.get_u8();
20102        __struct.target_component = buf.get_u8();
20103        let tmp = buf.get_u8();
20104        __struct.mission_type =
20105            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20106                enum_type: "MavMissionType",
20107                value: tmp as u32,
20108            })?;
20109        Ok(__struct)
20110    }
20111    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20112        let mut __tmp = BytesMut::new(bytes);
20113        #[allow(clippy::absurd_extreme_comparisons)]
20114        #[allow(unused_comparisons)]
20115        if __tmp.remaining() < Self::ENCODED_LEN {
20116            panic!(
20117                "buffer is too small (need {} bytes, but got {})",
20118                Self::ENCODED_LEN,
20119                __tmp.remaining(),
20120            )
20121        }
20122        __tmp.put_i16_le(self.start_index);
20123        __tmp.put_i16_le(self.end_index);
20124        __tmp.put_u8(self.target_system);
20125        __tmp.put_u8(self.target_component);
20126        __tmp.put_u8(self.mission_type as u8);
20127        if matches!(version, MavlinkVersion::V2) {
20128            let len = __tmp.len();
20129            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20130        } else {
20131            __tmp.len()
20132        }
20133    }
20134}
20135#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
20136#[doc = "id: 265"]
20137#[doc = "Orientation of a mount."]
20138#[derive(Debug, Clone, PartialEq)]
20139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20141pub struct MOUNT_ORIENTATION_DATA {
20142    #[doc = "Timestamp (time since system boot)."]
20143    pub time_boot_ms: u32,
20144    #[doc = "Roll in global frame (set to NaN for invalid)."]
20145    pub roll: f32,
20146    #[doc = "Pitch in global frame (set to NaN for invalid)."]
20147    pub pitch: f32,
20148    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
20149    pub yaw: f32,
20150    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
20151    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20152    pub yaw_absolute: f32,
20153}
20154impl MOUNT_ORIENTATION_DATA {
20155    pub const ENCODED_LEN: usize = 20usize;
20156    pub const DEFAULT: Self = Self {
20157        time_boot_ms: 0_u32,
20158        roll: 0.0_f32,
20159        pitch: 0.0_f32,
20160        yaw: 0.0_f32,
20161        yaw_absolute: 0.0_f32,
20162    };
20163    #[cfg(feature = "arbitrary")]
20164    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20165        use arbitrary::{Arbitrary, Unstructured};
20166        let mut buf = [0u8; 1024];
20167        rng.fill_bytes(&mut buf);
20168        let mut unstructured = Unstructured::new(&buf);
20169        Self::arbitrary(&mut unstructured).unwrap_or_default()
20170    }
20171}
20172impl Default for MOUNT_ORIENTATION_DATA {
20173    fn default() -> Self {
20174        Self::DEFAULT.clone()
20175    }
20176}
20177impl MessageData for MOUNT_ORIENTATION_DATA {
20178    type Message = MavMessage;
20179    const ID: u32 = 265u32;
20180    const NAME: &'static str = "MOUNT_ORIENTATION";
20181    const EXTRA_CRC: u8 = 26u8;
20182    const ENCODED_LEN: usize = 20usize;
20183    fn deser(
20184        _version: MavlinkVersion,
20185        __input: &[u8],
20186    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20187        let avail_len = __input.len();
20188        let mut payload_buf = [0; Self::ENCODED_LEN];
20189        let mut buf = if avail_len < Self::ENCODED_LEN {
20190            payload_buf[0..avail_len].copy_from_slice(__input);
20191            Bytes::new(&payload_buf)
20192        } else {
20193            Bytes::new(__input)
20194        };
20195        let mut __struct = Self::default();
20196        __struct.time_boot_ms = buf.get_u32_le();
20197        __struct.roll = buf.get_f32_le();
20198        __struct.pitch = buf.get_f32_le();
20199        __struct.yaw = buf.get_f32_le();
20200        __struct.yaw_absolute = buf.get_f32_le();
20201        Ok(__struct)
20202    }
20203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20204        let mut __tmp = BytesMut::new(bytes);
20205        #[allow(clippy::absurd_extreme_comparisons)]
20206        #[allow(unused_comparisons)]
20207        if __tmp.remaining() < Self::ENCODED_LEN {
20208            panic!(
20209                "buffer is too small (need {} bytes, but got {})",
20210                Self::ENCODED_LEN,
20211                __tmp.remaining(),
20212            )
20213        }
20214        __tmp.put_u32_le(self.time_boot_ms);
20215        __tmp.put_f32_le(self.roll);
20216        __tmp.put_f32_le(self.pitch);
20217        __tmp.put_f32_le(self.yaw);
20218        __tmp.put_f32_le(self.yaw_absolute);
20219        if matches!(version, MavlinkVersion::V2) {
20220            let len = __tmp.len();
20221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20222        } else {
20223            __tmp.len()
20224        }
20225    }
20226}
20227#[doc = "id: 251"]
20228#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20229#[derive(Debug, Clone, PartialEq)]
20230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20232pub struct NAMED_VALUE_FLOAT_DATA {
20233    #[doc = "Timestamp (time since system boot)."]
20234    pub time_boot_ms: u32,
20235    #[doc = "Floating point value"]
20236    pub value: f32,
20237    #[doc = "Name of the debug variable"]
20238    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20239    pub name: [u8; 10],
20240}
20241impl NAMED_VALUE_FLOAT_DATA {
20242    pub const ENCODED_LEN: usize = 18usize;
20243    pub const DEFAULT: Self = Self {
20244        time_boot_ms: 0_u32,
20245        value: 0.0_f32,
20246        name: [0_u8; 10usize],
20247    };
20248    #[cfg(feature = "arbitrary")]
20249    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20250        use arbitrary::{Arbitrary, Unstructured};
20251        let mut buf = [0u8; 1024];
20252        rng.fill_bytes(&mut buf);
20253        let mut unstructured = Unstructured::new(&buf);
20254        Self::arbitrary(&mut unstructured).unwrap_or_default()
20255    }
20256}
20257impl Default for NAMED_VALUE_FLOAT_DATA {
20258    fn default() -> Self {
20259        Self::DEFAULT.clone()
20260    }
20261}
20262impl MessageData for NAMED_VALUE_FLOAT_DATA {
20263    type Message = MavMessage;
20264    const ID: u32 = 251u32;
20265    const NAME: &'static str = "NAMED_VALUE_FLOAT";
20266    const EXTRA_CRC: u8 = 170u8;
20267    const ENCODED_LEN: usize = 18usize;
20268    fn deser(
20269        _version: MavlinkVersion,
20270        __input: &[u8],
20271    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20272        let avail_len = __input.len();
20273        let mut payload_buf = [0; Self::ENCODED_LEN];
20274        let mut buf = if avail_len < Self::ENCODED_LEN {
20275            payload_buf[0..avail_len].copy_from_slice(__input);
20276            Bytes::new(&payload_buf)
20277        } else {
20278            Bytes::new(__input)
20279        };
20280        let mut __struct = Self::default();
20281        __struct.time_boot_ms = buf.get_u32_le();
20282        __struct.value = buf.get_f32_le();
20283        for v in &mut __struct.name {
20284            let val = buf.get_u8();
20285            *v = val;
20286        }
20287        Ok(__struct)
20288    }
20289    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20290        let mut __tmp = BytesMut::new(bytes);
20291        #[allow(clippy::absurd_extreme_comparisons)]
20292        #[allow(unused_comparisons)]
20293        if __tmp.remaining() < Self::ENCODED_LEN {
20294            panic!(
20295                "buffer is too small (need {} bytes, but got {})",
20296                Self::ENCODED_LEN,
20297                __tmp.remaining(),
20298            )
20299        }
20300        __tmp.put_u32_le(self.time_boot_ms);
20301        __tmp.put_f32_le(self.value);
20302        for val in &self.name {
20303            __tmp.put_u8(*val);
20304        }
20305        if matches!(version, MavlinkVersion::V2) {
20306            let len = __tmp.len();
20307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20308        } else {
20309            __tmp.len()
20310        }
20311    }
20312}
20313#[doc = "id: 252"]
20314#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
20315#[derive(Debug, Clone, PartialEq)]
20316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20318pub struct NAMED_VALUE_INT_DATA {
20319    #[doc = "Timestamp (time since system boot)."]
20320    pub time_boot_ms: u32,
20321    #[doc = "Signed integer value"]
20322    pub value: i32,
20323    #[doc = "Name of the debug variable"]
20324    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20325    pub name: [u8; 10],
20326}
20327impl NAMED_VALUE_INT_DATA {
20328    pub const ENCODED_LEN: usize = 18usize;
20329    pub const DEFAULT: Self = Self {
20330        time_boot_ms: 0_u32,
20331        value: 0_i32,
20332        name: [0_u8; 10usize],
20333    };
20334    #[cfg(feature = "arbitrary")]
20335    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20336        use arbitrary::{Arbitrary, Unstructured};
20337        let mut buf = [0u8; 1024];
20338        rng.fill_bytes(&mut buf);
20339        let mut unstructured = Unstructured::new(&buf);
20340        Self::arbitrary(&mut unstructured).unwrap_or_default()
20341    }
20342}
20343impl Default for NAMED_VALUE_INT_DATA {
20344    fn default() -> Self {
20345        Self::DEFAULT.clone()
20346    }
20347}
20348impl MessageData for NAMED_VALUE_INT_DATA {
20349    type Message = MavMessage;
20350    const ID: u32 = 252u32;
20351    const NAME: &'static str = "NAMED_VALUE_INT";
20352    const EXTRA_CRC: u8 = 44u8;
20353    const ENCODED_LEN: usize = 18usize;
20354    fn deser(
20355        _version: MavlinkVersion,
20356        __input: &[u8],
20357    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20358        let avail_len = __input.len();
20359        let mut payload_buf = [0; Self::ENCODED_LEN];
20360        let mut buf = if avail_len < Self::ENCODED_LEN {
20361            payload_buf[0..avail_len].copy_from_slice(__input);
20362            Bytes::new(&payload_buf)
20363        } else {
20364            Bytes::new(__input)
20365        };
20366        let mut __struct = Self::default();
20367        __struct.time_boot_ms = buf.get_u32_le();
20368        __struct.value = buf.get_i32_le();
20369        for v in &mut __struct.name {
20370            let val = buf.get_u8();
20371            *v = val;
20372        }
20373        Ok(__struct)
20374    }
20375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20376        let mut __tmp = BytesMut::new(bytes);
20377        #[allow(clippy::absurd_extreme_comparisons)]
20378        #[allow(unused_comparisons)]
20379        if __tmp.remaining() < Self::ENCODED_LEN {
20380            panic!(
20381                "buffer is too small (need {} bytes, but got {})",
20382                Self::ENCODED_LEN,
20383                __tmp.remaining(),
20384            )
20385        }
20386        __tmp.put_u32_le(self.time_boot_ms);
20387        __tmp.put_i32_le(self.value);
20388        for val in &self.name {
20389            __tmp.put_u8(*val);
20390        }
20391        if matches!(version, MavlinkVersion::V2) {
20392            let len = __tmp.len();
20393            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20394        } else {
20395            __tmp.len()
20396        }
20397    }
20398}
20399#[doc = "id: 62"]
20400#[doc = "The state of the navigation and position controller."]
20401#[derive(Debug, Clone, PartialEq)]
20402#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20403#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20404pub struct NAV_CONTROLLER_OUTPUT_DATA {
20405    #[doc = "Current desired roll"]
20406    pub nav_roll: f32,
20407    #[doc = "Current desired pitch"]
20408    pub nav_pitch: f32,
20409    #[doc = "Current altitude error"]
20410    pub alt_error: f32,
20411    #[doc = "Current airspeed error"]
20412    pub aspd_error: f32,
20413    #[doc = "Current crosstrack error on x-y plane"]
20414    pub xtrack_error: f32,
20415    #[doc = "Current desired heading"]
20416    pub nav_bearing: i16,
20417    #[doc = "Bearing to current waypoint/target"]
20418    pub target_bearing: i16,
20419    #[doc = "Distance to active waypoint"]
20420    pub wp_dist: u16,
20421}
20422impl NAV_CONTROLLER_OUTPUT_DATA {
20423    pub const ENCODED_LEN: usize = 26usize;
20424    pub const DEFAULT: Self = Self {
20425        nav_roll: 0.0_f32,
20426        nav_pitch: 0.0_f32,
20427        alt_error: 0.0_f32,
20428        aspd_error: 0.0_f32,
20429        xtrack_error: 0.0_f32,
20430        nav_bearing: 0_i16,
20431        target_bearing: 0_i16,
20432        wp_dist: 0_u16,
20433    };
20434    #[cfg(feature = "arbitrary")]
20435    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20436        use arbitrary::{Arbitrary, Unstructured};
20437        let mut buf = [0u8; 1024];
20438        rng.fill_bytes(&mut buf);
20439        let mut unstructured = Unstructured::new(&buf);
20440        Self::arbitrary(&mut unstructured).unwrap_or_default()
20441    }
20442}
20443impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20444    fn default() -> Self {
20445        Self::DEFAULT.clone()
20446    }
20447}
20448impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20449    type Message = MavMessage;
20450    const ID: u32 = 62u32;
20451    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20452    const EXTRA_CRC: u8 = 183u8;
20453    const ENCODED_LEN: usize = 26usize;
20454    fn deser(
20455        _version: MavlinkVersion,
20456        __input: &[u8],
20457    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20458        let avail_len = __input.len();
20459        let mut payload_buf = [0; Self::ENCODED_LEN];
20460        let mut buf = if avail_len < Self::ENCODED_LEN {
20461            payload_buf[0..avail_len].copy_from_slice(__input);
20462            Bytes::new(&payload_buf)
20463        } else {
20464            Bytes::new(__input)
20465        };
20466        let mut __struct = Self::default();
20467        __struct.nav_roll = buf.get_f32_le();
20468        __struct.nav_pitch = buf.get_f32_le();
20469        __struct.alt_error = buf.get_f32_le();
20470        __struct.aspd_error = buf.get_f32_le();
20471        __struct.xtrack_error = buf.get_f32_le();
20472        __struct.nav_bearing = buf.get_i16_le();
20473        __struct.target_bearing = buf.get_i16_le();
20474        __struct.wp_dist = buf.get_u16_le();
20475        Ok(__struct)
20476    }
20477    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20478        let mut __tmp = BytesMut::new(bytes);
20479        #[allow(clippy::absurd_extreme_comparisons)]
20480        #[allow(unused_comparisons)]
20481        if __tmp.remaining() < Self::ENCODED_LEN {
20482            panic!(
20483                "buffer is too small (need {} bytes, but got {})",
20484                Self::ENCODED_LEN,
20485                __tmp.remaining(),
20486            )
20487        }
20488        __tmp.put_f32_le(self.nav_roll);
20489        __tmp.put_f32_le(self.nav_pitch);
20490        __tmp.put_f32_le(self.alt_error);
20491        __tmp.put_f32_le(self.aspd_error);
20492        __tmp.put_f32_le(self.xtrack_error);
20493        __tmp.put_i16_le(self.nav_bearing);
20494        __tmp.put_i16_le(self.target_bearing);
20495        __tmp.put_u16_le(self.wp_dist);
20496        if matches!(version, MavlinkVersion::V2) {
20497            let len = __tmp.len();
20498            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20499        } else {
20500            __tmp.len()
20501        }
20502    }
20503}
20504#[doc = "id: 330"]
20505#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20506#[derive(Debug, Clone, PartialEq)]
20507#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20509pub struct OBSTACLE_DISTANCE_DATA {
20510    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20511    pub time_usec: u64,
20512    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20513    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20514    pub distances: [u16; 72],
20515    #[doc = "Minimum distance the sensor can measure."]
20516    pub min_distance: u16,
20517    #[doc = "Maximum distance the sensor can measure."]
20518    pub max_distance: u16,
20519    #[doc = "Class id of the distance sensor type."]
20520    pub sensor_type: MavDistanceSensor,
20521    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20522    pub increment: u8,
20523    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20524    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20525    pub increment_f: f32,
20526    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20528    pub angle_offset: f32,
20529    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20530    #[cfg_attr(feature = "serde", serde(default))]
20531    pub frame: MavFrame,
20532}
20533impl OBSTACLE_DISTANCE_DATA {
20534    pub const ENCODED_LEN: usize = 167usize;
20535    pub const DEFAULT: Self = Self {
20536        time_usec: 0_u64,
20537        distances: [0_u16; 72usize],
20538        min_distance: 0_u16,
20539        max_distance: 0_u16,
20540        sensor_type: MavDistanceSensor::DEFAULT,
20541        increment: 0_u8,
20542        increment_f: 0.0_f32,
20543        angle_offset: 0.0_f32,
20544        frame: MavFrame::DEFAULT,
20545    };
20546    #[cfg(feature = "arbitrary")]
20547    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20548        use arbitrary::{Arbitrary, Unstructured};
20549        let mut buf = [0u8; 1024];
20550        rng.fill_bytes(&mut buf);
20551        let mut unstructured = Unstructured::new(&buf);
20552        Self::arbitrary(&mut unstructured).unwrap_or_default()
20553    }
20554}
20555impl Default for OBSTACLE_DISTANCE_DATA {
20556    fn default() -> Self {
20557        Self::DEFAULT.clone()
20558    }
20559}
20560impl MessageData for OBSTACLE_DISTANCE_DATA {
20561    type Message = MavMessage;
20562    const ID: u32 = 330u32;
20563    const NAME: &'static str = "OBSTACLE_DISTANCE";
20564    const EXTRA_CRC: u8 = 23u8;
20565    const ENCODED_LEN: usize = 167usize;
20566    fn deser(
20567        _version: MavlinkVersion,
20568        __input: &[u8],
20569    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20570        let avail_len = __input.len();
20571        let mut payload_buf = [0; Self::ENCODED_LEN];
20572        let mut buf = if avail_len < Self::ENCODED_LEN {
20573            payload_buf[0..avail_len].copy_from_slice(__input);
20574            Bytes::new(&payload_buf)
20575        } else {
20576            Bytes::new(__input)
20577        };
20578        let mut __struct = Self::default();
20579        __struct.time_usec = buf.get_u64_le();
20580        for v in &mut __struct.distances {
20581            let val = buf.get_u16_le();
20582            *v = val;
20583        }
20584        __struct.min_distance = buf.get_u16_le();
20585        __struct.max_distance = buf.get_u16_le();
20586        let tmp = buf.get_u8();
20587        __struct.sensor_type =
20588            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20589                enum_type: "MavDistanceSensor",
20590                value: tmp as u32,
20591            })?;
20592        __struct.increment = buf.get_u8();
20593        __struct.increment_f = buf.get_f32_le();
20594        __struct.angle_offset = buf.get_f32_le();
20595        let tmp = buf.get_u8();
20596        __struct.frame =
20597            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20598                enum_type: "MavFrame",
20599                value: tmp as u32,
20600            })?;
20601        Ok(__struct)
20602    }
20603    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20604        let mut __tmp = BytesMut::new(bytes);
20605        #[allow(clippy::absurd_extreme_comparisons)]
20606        #[allow(unused_comparisons)]
20607        if __tmp.remaining() < Self::ENCODED_LEN {
20608            panic!(
20609                "buffer is too small (need {} bytes, but got {})",
20610                Self::ENCODED_LEN,
20611                __tmp.remaining(),
20612            )
20613        }
20614        __tmp.put_u64_le(self.time_usec);
20615        for val in &self.distances {
20616            __tmp.put_u16_le(*val);
20617        }
20618        __tmp.put_u16_le(self.min_distance);
20619        __tmp.put_u16_le(self.max_distance);
20620        __tmp.put_u8(self.sensor_type as u8);
20621        __tmp.put_u8(self.increment);
20622        __tmp.put_f32_le(self.increment_f);
20623        __tmp.put_f32_le(self.angle_offset);
20624        __tmp.put_u8(self.frame as u8);
20625        if matches!(version, MavlinkVersion::V2) {
20626            let len = __tmp.len();
20627            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20628        } else {
20629            __tmp.len()
20630        }
20631    }
20632}
20633#[doc = "id: 331"]
20634#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20635#[derive(Debug, Clone, PartialEq)]
20636#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20637#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20638pub struct ODOMETRY_DATA {
20639    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20640    pub time_usec: u64,
20641    #[doc = "X Position"]
20642    pub x: f32,
20643    #[doc = "Y Position"]
20644    pub y: f32,
20645    #[doc = "Z Position"]
20646    pub z: f32,
20647    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
20648    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20649    pub q: [f32; 4],
20650    #[doc = "X linear speed"]
20651    pub vx: f32,
20652    #[doc = "Y linear speed"]
20653    pub vy: f32,
20654    #[doc = "Z linear speed"]
20655    pub vz: f32,
20656    #[doc = "Roll angular speed"]
20657    pub rollspeed: f32,
20658    #[doc = "Pitch angular speed"]
20659    pub pitchspeed: f32,
20660    #[doc = "Yaw angular speed"]
20661    pub yawspeed: f32,
20662    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20663    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20664    pub pose_covariance: [f32; 21],
20665    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20666    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20667    pub velocity_covariance: [f32; 21],
20668    #[doc = "Coordinate frame of reference for the pose data."]
20669    pub frame_id: MavFrame,
20670    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
20671    pub child_frame_id: MavFrame,
20672    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
20673    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20674    pub reset_counter: u8,
20675    #[doc = "Type of estimator that is providing the odometry."]
20676    #[cfg_attr(feature = "serde", serde(default))]
20677    pub estimator_type: MavEstimatorType,
20678    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
20679    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20680    pub quality: i8,
20681}
20682impl ODOMETRY_DATA {
20683    pub const ENCODED_LEN: usize = 233usize;
20684    pub const DEFAULT: Self = Self {
20685        time_usec: 0_u64,
20686        x: 0.0_f32,
20687        y: 0.0_f32,
20688        z: 0.0_f32,
20689        q: [0.0_f32; 4usize],
20690        vx: 0.0_f32,
20691        vy: 0.0_f32,
20692        vz: 0.0_f32,
20693        rollspeed: 0.0_f32,
20694        pitchspeed: 0.0_f32,
20695        yawspeed: 0.0_f32,
20696        pose_covariance: [0.0_f32; 21usize],
20697        velocity_covariance: [0.0_f32; 21usize],
20698        frame_id: MavFrame::DEFAULT,
20699        child_frame_id: MavFrame::DEFAULT,
20700        reset_counter: 0_u8,
20701        estimator_type: MavEstimatorType::DEFAULT,
20702        quality: 0_i8,
20703    };
20704    #[cfg(feature = "arbitrary")]
20705    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20706        use arbitrary::{Arbitrary, Unstructured};
20707        let mut buf = [0u8; 1024];
20708        rng.fill_bytes(&mut buf);
20709        let mut unstructured = Unstructured::new(&buf);
20710        Self::arbitrary(&mut unstructured).unwrap_or_default()
20711    }
20712}
20713impl Default for ODOMETRY_DATA {
20714    fn default() -> Self {
20715        Self::DEFAULT.clone()
20716    }
20717}
20718impl MessageData for ODOMETRY_DATA {
20719    type Message = MavMessage;
20720    const ID: u32 = 331u32;
20721    const NAME: &'static str = "ODOMETRY";
20722    const EXTRA_CRC: u8 = 91u8;
20723    const ENCODED_LEN: usize = 233usize;
20724    fn deser(
20725        _version: MavlinkVersion,
20726        __input: &[u8],
20727    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20728        let avail_len = __input.len();
20729        let mut payload_buf = [0; Self::ENCODED_LEN];
20730        let mut buf = if avail_len < Self::ENCODED_LEN {
20731            payload_buf[0..avail_len].copy_from_slice(__input);
20732            Bytes::new(&payload_buf)
20733        } else {
20734            Bytes::new(__input)
20735        };
20736        let mut __struct = Self::default();
20737        __struct.time_usec = buf.get_u64_le();
20738        __struct.x = buf.get_f32_le();
20739        __struct.y = buf.get_f32_le();
20740        __struct.z = buf.get_f32_le();
20741        for v in &mut __struct.q {
20742            let val = buf.get_f32_le();
20743            *v = val;
20744        }
20745        __struct.vx = buf.get_f32_le();
20746        __struct.vy = buf.get_f32_le();
20747        __struct.vz = buf.get_f32_le();
20748        __struct.rollspeed = buf.get_f32_le();
20749        __struct.pitchspeed = buf.get_f32_le();
20750        __struct.yawspeed = buf.get_f32_le();
20751        for v in &mut __struct.pose_covariance {
20752            let val = buf.get_f32_le();
20753            *v = val;
20754        }
20755        for v in &mut __struct.velocity_covariance {
20756            let val = buf.get_f32_le();
20757            *v = val;
20758        }
20759        let tmp = buf.get_u8();
20760        __struct.frame_id =
20761            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20762                enum_type: "MavFrame",
20763                value: tmp as u32,
20764            })?;
20765        let tmp = buf.get_u8();
20766        __struct.child_frame_id =
20767            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20768                enum_type: "MavFrame",
20769                value: tmp as u32,
20770            })?;
20771        __struct.reset_counter = buf.get_u8();
20772        let tmp = buf.get_u8();
20773        __struct.estimator_type =
20774            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20775                enum_type: "MavEstimatorType",
20776                value: tmp as u32,
20777            })?;
20778        __struct.quality = buf.get_i8();
20779        Ok(__struct)
20780    }
20781    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20782        let mut __tmp = BytesMut::new(bytes);
20783        #[allow(clippy::absurd_extreme_comparisons)]
20784        #[allow(unused_comparisons)]
20785        if __tmp.remaining() < Self::ENCODED_LEN {
20786            panic!(
20787                "buffer is too small (need {} bytes, but got {})",
20788                Self::ENCODED_LEN,
20789                __tmp.remaining(),
20790            )
20791        }
20792        __tmp.put_u64_le(self.time_usec);
20793        __tmp.put_f32_le(self.x);
20794        __tmp.put_f32_le(self.y);
20795        __tmp.put_f32_le(self.z);
20796        for val in &self.q {
20797            __tmp.put_f32_le(*val);
20798        }
20799        __tmp.put_f32_le(self.vx);
20800        __tmp.put_f32_le(self.vy);
20801        __tmp.put_f32_le(self.vz);
20802        __tmp.put_f32_le(self.rollspeed);
20803        __tmp.put_f32_le(self.pitchspeed);
20804        __tmp.put_f32_le(self.yawspeed);
20805        for val in &self.pose_covariance {
20806            __tmp.put_f32_le(*val);
20807        }
20808        for val in &self.velocity_covariance {
20809            __tmp.put_f32_le(*val);
20810        }
20811        __tmp.put_u8(self.frame_id as u8);
20812        __tmp.put_u8(self.child_frame_id as u8);
20813        __tmp.put_u8(self.reset_counter);
20814        __tmp.put_u8(self.estimator_type as u8);
20815        __tmp.put_i8(self.quality);
20816        if matches!(version, MavlinkVersion::V2) {
20817            let len = __tmp.len();
20818            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20819        } else {
20820            __tmp.len()
20821        }
20822    }
20823}
20824#[doc = "id: 390"]
20825#[doc = "Hardware status sent by an onboard computer."]
20826#[derive(Debug, Clone, PartialEq)]
20827#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20828#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20829pub struct ONBOARD_COMPUTER_STATUS_DATA {
20830    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20831    pub time_usec: u64,
20832    #[doc = "Time since system boot."]
20833    pub uptime: u32,
20834    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20835    pub ram_usage: u32,
20836    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20837    pub ram_total: u32,
20838    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
20839    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20840    pub storage_type: [u32; 4],
20841    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20842    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20843    pub storage_usage: [u32; 4],
20844    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20845    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20846    pub storage_total: [u32; 4],
20847    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
20848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20849    pub link_type: [u32; 6],
20850    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
20851    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20852    pub link_tx_rate: [u32; 6],
20853    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
20854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20855    pub link_rx_rate: [u32; 6],
20856    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
20857    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20858    pub link_tx_max: [u32; 6],
20859    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
20860    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20861    pub link_rx_max: [u32; 6],
20862    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
20863    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20864    pub fan_speed: [i16; 4],
20865    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
20866    pub mavtype: u8,
20867    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20868    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20869    pub cpu_cores: [u8; 8],
20870    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20871    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20872    pub cpu_combined: [u8; 10],
20873    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20874    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20875    pub gpu_cores: [u8; 4],
20876    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20877    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20878    pub gpu_combined: [u8; 10],
20879    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
20880    pub temperature_board: i8,
20881    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
20882    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20883    pub temperature_core: [i8; 8],
20884}
20885impl ONBOARD_COMPUTER_STATUS_DATA {
20886    pub const ENCODED_LEN: usize = 238usize;
20887    pub const DEFAULT: Self = Self {
20888        time_usec: 0_u64,
20889        uptime: 0_u32,
20890        ram_usage: 0_u32,
20891        ram_total: 0_u32,
20892        storage_type: [0_u32; 4usize],
20893        storage_usage: [0_u32; 4usize],
20894        storage_total: [0_u32; 4usize],
20895        link_type: [0_u32; 6usize],
20896        link_tx_rate: [0_u32; 6usize],
20897        link_rx_rate: [0_u32; 6usize],
20898        link_tx_max: [0_u32; 6usize],
20899        link_rx_max: [0_u32; 6usize],
20900        fan_speed: [0_i16; 4usize],
20901        mavtype: 0_u8,
20902        cpu_cores: [0_u8; 8usize],
20903        cpu_combined: [0_u8; 10usize],
20904        gpu_cores: [0_u8; 4usize],
20905        gpu_combined: [0_u8; 10usize],
20906        temperature_board: 0_i8,
20907        temperature_core: [0_i8; 8usize],
20908    };
20909    #[cfg(feature = "arbitrary")]
20910    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20911        use arbitrary::{Arbitrary, Unstructured};
20912        let mut buf = [0u8; 1024];
20913        rng.fill_bytes(&mut buf);
20914        let mut unstructured = Unstructured::new(&buf);
20915        Self::arbitrary(&mut unstructured).unwrap_or_default()
20916    }
20917}
20918impl Default for ONBOARD_COMPUTER_STATUS_DATA {
20919    fn default() -> Self {
20920        Self::DEFAULT.clone()
20921    }
20922}
20923impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
20924    type Message = MavMessage;
20925    const ID: u32 = 390u32;
20926    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
20927    const EXTRA_CRC: u8 = 156u8;
20928    const ENCODED_LEN: usize = 238usize;
20929    fn deser(
20930        _version: MavlinkVersion,
20931        __input: &[u8],
20932    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20933        let avail_len = __input.len();
20934        let mut payload_buf = [0; Self::ENCODED_LEN];
20935        let mut buf = if avail_len < Self::ENCODED_LEN {
20936            payload_buf[0..avail_len].copy_from_slice(__input);
20937            Bytes::new(&payload_buf)
20938        } else {
20939            Bytes::new(__input)
20940        };
20941        let mut __struct = Self::default();
20942        __struct.time_usec = buf.get_u64_le();
20943        __struct.uptime = buf.get_u32_le();
20944        __struct.ram_usage = buf.get_u32_le();
20945        __struct.ram_total = buf.get_u32_le();
20946        for v in &mut __struct.storage_type {
20947            let val = buf.get_u32_le();
20948            *v = val;
20949        }
20950        for v in &mut __struct.storage_usage {
20951            let val = buf.get_u32_le();
20952            *v = val;
20953        }
20954        for v in &mut __struct.storage_total {
20955            let val = buf.get_u32_le();
20956            *v = val;
20957        }
20958        for v in &mut __struct.link_type {
20959            let val = buf.get_u32_le();
20960            *v = val;
20961        }
20962        for v in &mut __struct.link_tx_rate {
20963            let val = buf.get_u32_le();
20964            *v = val;
20965        }
20966        for v in &mut __struct.link_rx_rate {
20967            let val = buf.get_u32_le();
20968            *v = val;
20969        }
20970        for v in &mut __struct.link_tx_max {
20971            let val = buf.get_u32_le();
20972            *v = val;
20973        }
20974        for v in &mut __struct.link_rx_max {
20975            let val = buf.get_u32_le();
20976            *v = val;
20977        }
20978        for v in &mut __struct.fan_speed {
20979            let val = buf.get_i16_le();
20980            *v = val;
20981        }
20982        __struct.mavtype = buf.get_u8();
20983        for v in &mut __struct.cpu_cores {
20984            let val = buf.get_u8();
20985            *v = val;
20986        }
20987        for v in &mut __struct.cpu_combined {
20988            let val = buf.get_u8();
20989            *v = val;
20990        }
20991        for v in &mut __struct.gpu_cores {
20992            let val = buf.get_u8();
20993            *v = val;
20994        }
20995        for v in &mut __struct.gpu_combined {
20996            let val = buf.get_u8();
20997            *v = val;
20998        }
20999        __struct.temperature_board = buf.get_i8();
21000        for v in &mut __struct.temperature_core {
21001            let val = buf.get_i8();
21002            *v = val;
21003        }
21004        Ok(__struct)
21005    }
21006    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21007        let mut __tmp = BytesMut::new(bytes);
21008        #[allow(clippy::absurd_extreme_comparisons)]
21009        #[allow(unused_comparisons)]
21010        if __tmp.remaining() < Self::ENCODED_LEN {
21011            panic!(
21012                "buffer is too small (need {} bytes, but got {})",
21013                Self::ENCODED_LEN,
21014                __tmp.remaining(),
21015            )
21016        }
21017        __tmp.put_u64_le(self.time_usec);
21018        __tmp.put_u32_le(self.uptime);
21019        __tmp.put_u32_le(self.ram_usage);
21020        __tmp.put_u32_le(self.ram_total);
21021        for val in &self.storage_type {
21022            __tmp.put_u32_le(*val);
21023        }
21024        for val in &self.storage_usage {
21025            __tmp.put_u32_le(*val);
21026        }
21027        for val in &self.storage_total {
21028            __tmp.put_u32_le(*val);
21029        }
21030        for val in &self.link_type {
21031            __tmp.put_u32_le(*val);
21032        }
21033        for val in &self.link_tx_rate {
21034            __tmp.put_u32_le(*val);
21035        }
21036        for val in &self.link_rx_rate {
21037            __tmp.put_u32_le(*val);
21038        }
21039        for val in &self.link_tx_max {
21040            __tmp.put_u32_le(*val);
21041        }
21042        for val in &self.link_rx_max {
21043            __tmp.put_u32_le(*val);
21044        }
21045        for val in &self.fan_speed {
21046            __tmp.put_i16_le(*val);
21047        }
21048        __tmp.put_u8(self.mavtype);
21049        for val in &self.cpu_cores {
21050            __tmp.put_u8(*val);
21051        }
21052        for val in &self.cpu_combined {
21053            __tmp.put_u8(*val);
21054        }
21055        for val in &self.gpu_cores {
21056            __tmp.put_u8(*val);
21057        }
21058        for val in &self.gpu_combined {
21059            __tmp.put_u8(*val);
21060        }
21061        __tmp.put_i8(self.temperature_board);
21062        for val in &self.temperature_core {
21063            __tmp.put_i8(*val);
21064        }
21065        if matches!(version, MavlinkVersion::V2) {
21066            let len = __tmp.len();
21067            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21068        } else {
21069            __tmp.len()
21070        }
21071    }
21072}
21073#[doc = "id: 12918"]
21074#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
21075#[derive(Debug, Clone, PartialEq)]
21076#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21078pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
21079    #[doc = "Status level indicating if arming is allowed."]
21080    pub status: MavOdidArmStatus,
21081    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
21082    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21083    pub error: [u8; 50],
21084}
21085impl OPEN_DRONE_ID_ARM_STATUS_DATA {
21086    pub const ENCODED_LEN: usize = 51usize;
21087    pub const DEFAULT: Self = Self {
21088        status: MavOdidArmStatus::DEFAULT,
21089        error: [0_u8; 50usize],
21090    };
21091    #[cfg(feature = "arbitrary")]
21092    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21093        use arbitrary::{Arbitrary, Unstructured};
21094        let mut buf = [0u8; 1024];
21095        rng.fill_bytes(&mut buf);
21096        let mut unstructured = Unstructured::new(&buf);
21097        Self::arbitrary(&mut unstructured).unwrap_or_default()
21098    }
21099}
21100impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
21101    fn default() -> Self {
21102        Self::DEFAULT.clone()
21103    }
21104}
21105impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
21106    type Message = MavMessage;
21107    const ID: u32 = 12918u32;
21108    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
21109    const EXTRA_CRC: u8 = 139u8;
21110    const ENCODED_LEN: usize = 51usize;
21111    fn deser(
21112        _version: MavlinkVersion,
21113        __input: &[u8],
21114    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21115        let avail_len = __input.len();
21116        let mut payload_buf = [0; Self::ENCODED_LEN];
21117        let mut buf = if avail_len < Self::ENCODED_LEN {
21118            payload_buf[0..avail_len].copy_from_slice(__input);
21119            Bytes::new(&payload_buf)
21120        } else {
21121            Bytes::new(__input)
21122        };
21123        let mut __struct = Self::default();
21124        let tmp = buf.get_u8();
21125        __struct.status =
21126            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21127                enum_type: "MavOdidArmStatus",
21128                value: tmp as u32,
21129            })?;
21130        for v in &mut __struct.error {
21131            let val = buf.get_u8();
21132            *v = val;
21133        }
21134        Ok(__struct)
21135    }
21136    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21137        let mut __tmp = BytesMut::new(bytes);
21138        #[allow(clippy::absurd_extreme_comparisons)]
21139        #[allow(unused_comparisons)]
21140        if __tmp.remaining() < Self::ENCODED_LEN {
21141            panic!(
21142                "buffer is too small (need {} bytes, but got {})",
21143                Self::ENCODED_LEN,
21144                __tmp.remaining(),
21145            )
21146        }
21147        __tmp.put_u8(self.status as u8);
21148        for val in &self.error {
21149            __tmp.put_u8(*val);
21150        }
21151        if matches!(version, MavlinkVersion::V2) {
21152            let len = __tmp.len();
21153            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21154        } else {
21155            __tmp.len()
21156        }
21157    }
21158}
21159#[doc = "id: 12902"]
21160#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
21161#[derive(Debug, Clone, PartialEq)]
21162#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21163#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21164pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
21165    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21166    pub timestamp: u32,
21167    #[doc = "System ID (0 for broadcast)."]
21168    pub target_system: u8,
21169    #[doc = "Component ID (0 for broadcast)."]
21170    pub target_component: u8,
21171    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21172    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21173    pub id_or_mac: [u8; 20],
21174    #[doc = "Indicates the type of authentication."]
21175    pub authentication_type: MavOdidAuthType,
21176    #[doc = "Allowed range is 0 - 15."]
21177    pub data_page: u8,
21178    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21179    pub last_page_index: u8,
21180    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
21181    pub length: u8,
21182    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
21183    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21184    pub authentication_data: [u8; 23],
21185}
21186impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
21187    pub const ENCODED_LEN: usize = 53usize;
21188    pub const DEFAULT: Self = Self {
21189        timestamp: 0_u32,
21190        target_system: 0_u8,
21191        target_component: 0_u8,
21192        id_or_mac: [0_u8; 20usize],
21193        authentication_type: MavOdidAuthType::DEFAULT,
21194        data_page: 0_u8,
21195        last_page_index: 0_u8,
21196        length: 0_u8,
21197        authentication_data: [0_u8; 23usize],
21198    };
21199    #[cfg(feature = "arbitrary")]
21200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21201        use arbitrary::{Arbitrary, Unstructured};
21202        let mut buf = [0u8; 1024];
21203        rng.fill_bytes(&mut buf);
21204        let mut unstructured = Unstructured::new(&buf);
21205        Self::arbitrary(&mut unstructured).unwrap_or_default()
21206    }
21207}
21208impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21209    fn default() -> Self {
21210        Self::DEFAULT.clone()
21211    }
21212}
21213impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
21214    type Message = MavMessage;
21215    const ID: u32 = 12902u32;
21216    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21217    const EXTRA_CRC: u8 = 140u8;
21218    const ENCODED_LEN: usize = 53usize;
21219    fn deser(
21220        _version: MavlinkVersion,
21221        __input: &[u8],
21222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21223        let avail_len = __input.len();
21224        let mut payload_buf = [0; Self::ENCODED_LEN];
21225        let mut buf = if avail_len < Self::ENCODED_LEN {
21226            payload_buf[0..avail_len].copy_from_slice(__input);
21227            Bytes::new(&payload_buf)
21228        } else {
21229            Bytes::new(__input)
21230        };
21231        let mut __struct = Self::default();
21232        __struct.timestamp = buf.get_u32_le();
21233        __struct.target_system = buf.get_u8();
21234        __struct.target_component = buf.get_u8();
21235        for v in &mut __struct.id_or_mac {
21236            let val = buf.get_u8();
21237            *v = val;
21238        }
21239        let tmp = buf.get_u8();
21240        __struct.authentication_type =
21241            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21242                enum_type: "MavOdidAuthType",
21243                value: tmp as u32,
21244            })?;
21245        __struct.data_page = buf.get_u8();
21246        __struct.last_page_index = buf.get_u8();
21247        __struct.length = buf.get_u8();
21248        for v in &mut __struct.authentication_data {
21249            let val = buf.get_u8();
21250            *v = val;
21251        }
21252        Ok(__struct)
21253    }
21254    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21255        let mut __tmp = BytesMut::new(bytes);
21256        #[allow(clippy::absurd_extreme_comparisons)]
21257        #[allow(unused_comparisons)]
21258        if __tmp.remaining() < Self::ENCODED_LEN {
21259            panic!(
21260                "buffer is too small (need {} bytes, but got {})",
21261                Self::ENCODED_LEN,
21262                __tmp.remaining(),
21263            )
21264        }
21265        __tmp.put_u32_le(self.timestamp);
21266        __tmp.put_u8(self.target_system);
21267        __tmp.put_u8(self.target_component);
21268        for val in &self.id_or_mac {
21269            __tmp.put_u8(*val);
21270        }
21271        __tmp.put_u8(self.authentication_type as u8);
21272        __tmp.put_u8(self.data_page);
21273        __tmp.put_u8(self.last_page_index);
21274        __tmp.put_u8(self.length);
21275        for val in &self.authentication_data {
21276            __tmp.put_u8(*val);
21277        }
21278        if matches!(version, MavlinkVersion::V2) {
21279            let len = __tmp.len();
21280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21281        } else {
21282            __tmp.len()
21283        }
21284    }
21285}
21286#[doc = "id: 12900"]
21287#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21288#[derive(Debug, Clone, PartialEq)]
21289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21291pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21292    #[doc = "System ID (0 for broadcast)."]
21293    pub target_system: u8,
21294    #[doc = "Component ID (0 for broadcast)."]
21295    pub target_component: u8,
21296    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21297    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21298    pub id_or_mac: [u8; 20],
21299    #[doc = "Indicates the format for the uas_id field of this message."]
21300    pub id_type: MavOdidIdType,
21301    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21302    pub ua_type: MavOdidUaType,
21303    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21304    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21305    pub uas_id: [u8; 20],
21306}
21307impl OPEN_DRONE_ID_BASIC_ID_DATA {
21308    pub const ENCODED_LEN: usize = 44usize;
21309    pub const DEFAULT: Self = Self {
21310        target_system: 0_u8,
21311        target_component: 0_u8,
21312        id_or_mac: [0_u8; 20usize],
21313        id_type: MavOdidIdType::DEFAULT,
21314        ua_type: MavOdidUaType::DEFAULT,
21315        uas_id: [0_u8; 20usize],
21316    };
21317    #[cfg(feature = "arbitrary")]
21318    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21319        use arbitrary::{Arbitrary, Unstructured};
21320        let mut buf = [0u8; 1024];
21321        rng.fill_bytes(&mut buf);
21322        let mut unstructured = Unstructured::new(&buf);
21323        Self::arbitrary(&mut unstructured).unwrap_or_default()
21324    }
21325}
21326impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21327    fn default() -> Self {
21328        Self::DEFAULT.clone()
21329    }
21330}
21331impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21332    type Message = MavMessage;
21333    const ID: u32 = 12900u32;
21334    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21335    const EXTRA_CRC: u8 = 114u8;
21336    const ENCODED_LEN: usize = 44usize;
21337    fn deser(
21338        _version: MavlinkVersion,
21339        __input: &[u8],
21340    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21341        let avail_len = __input.len();
21342        let mut payload_buf = [0; Self::ENCODED_LEN];
21343        let mut buf = if avail_len < Self::ENCODED_LEN {
21344            payload_buf[0..avail_len].copy_from_slice(__input);
21345            Bytes::new(&payload_buf)
21346        } else {
21347            Bytes::new(__input)
21348        };
21349        let mut __struct = Self::default();
21350        __struct.target_system = buf.get_u8();
21351        __struct.target_component = buf.get_u8();
21352        for v in &mut __struct.id_or_mac {
21353            let val = buf.get_u8();
21354            *v = val;
21355        }
21356        let tmp = buf.get_u8();
21357        __struct.id_type =
21358            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21359                enum_type: "MavOdidIdType",
21360                value: tmp as u32,
21361            })?;
21362        let tmp = buf.get_u8();
21363        __struct.ua_type =
21364            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21365                enum_type: "MavOdidUaType",
21366                value: tmp as u32,
21367            })?;
21368        for v in &mut __struct.uas_id {
21369            let val = buf.get_u8();
21370            *v = val;
21371        }
21372        Ok(__struct)
21373    }
21374    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21375        let mut __tmp = BytesMut::new(bytes);
21376        #[allow(clippy::absurd_extreme_comparisons)]
21377        #[allow(unused_comparisons)]
21378        if __tmp.remaining() < Self::ENCODED_LEN {
21379            panic!(
21380                "buffer is too small (need {} bytes, but got {})",
21381                Self::ENCODED_LEN,
21382                __tmp.remaining(),
21383            )
21384        }
21385        __tmp.put_u8(self.target_system);
21386        __tmp.put_u8(self.target_component);
21387        for val in &self.id_or_mac {
21388            __tmp.put_u8(*val);
21389        }
21390        __tmp.put_u8(self.id_type as u8);
21391        __tmp.put_u8(self.ua_type as u8);
21392        for val in &self.uas_id {
21393            __tmp.put_u8(*val);
21394        }
21395        if matches!(version, MavlinkVersion::V2) {
21396            let len = __tmp.len();
21397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21398        } else {
21399            __tmp.len()
21400        }
21401    }
21402}
21403#[doc = "id: 12901"]
21404#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21405#[derive(Debug, Clone, PartialEq)]
21406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21408pub struct OPEN_DRONE_ID_LOCATION_DATA {
21409    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21410    pub latitude: i32,
21411    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21412    pub longitude: i32,
21413    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21414    pub altitude_barometric: f32,
21415    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21416    pub altitude_geodetic: f32,
21417    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21418    pub height: f32,
21419    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21420    pub timestamp: f32,
21421    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21422    pub direction: u16,
21423    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21424    pub speed_horizontal: u16,
21425    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21426    pub speed_vertical: i16,
21427    #[doc = "System ID (0 for broadcast)."]
21428    pub target_system: u8,
21429    #[doc = "Component ID (0 for broadcast)."]
21430    pub target_component: u8,
21431    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21432    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21433    pub id_or_mac: [u8; 20],
21434    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21435    pub status: MavOdidStatus,
21436    #[doc = "Indicates the reference point for the height field."]
21437    pub height_reference: MavOdidHeightRef,
21438    #[doc = "The accuracy of the horizontal position."]
21439    pub horizontal_accuracy: MavOdidHorAcc,
21440    #[doc = "The accuracy of the vertical position."]
21441    pub vertical_accuracy: MavOdidVerAcc,
21442    #[doc = "The accuracy of the barometric altitude."]
21443    pub barometer_accuracy: MavOdidVerAcc,
21444    #[doc = "The accuracy of the horizontal and vertical speed."]
21445    pub speed_accuracy: MavOdidSpeedAcc,
21446    #[doc = "The accuracy of the timestamps."]
21447    pub timestamp_accuracy: MavOdidTimeAcc,
21448}
21449impl OPEN_DRONE_ID_LOCATION_DATA {
21450    pub const ENCODED_LEN: usize = 59usize;
21451    pub const DEFAULT: Self = Self {
21452        latitude: 0_i32,
21453        longitude: 0_i32,
21454        altitude_barometric: 0.0_f32,
21455        altitude_geodetic: 0.0_f32,
21456        height: 0.0_f32,
21457        timestamp: 0.0_f32,
21458        direction: 0_u16,
21459        speed_horizontal: 0_u16,
21460        speed_vertical: 0_i16,
21461        target_system: 0_u8,
21462        target_component: 0_u8,
21463        id_or_mac: [0_u8; 20usize],
21464        status: MavOdidStatus::DEFAULT,
21465        height_reference: MavOdidHeightRef::DEFAULT,
21466        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21467        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21468        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21469        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21470        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21471    };
21472    #[cfg(feature = "arbitrary")]
21473    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21474        use arbitrary::{Arbitrary, Unstructured};
21475        let mut buf = [0u8; 1024];
21476        rng.fill_bytes(&mut buf);
21477        let mut unstructured = Unstructured::new(&buf);
21478        Self::arbitrary(&mut unstructured).unwrap_or_default()
21479    }
21480}
21481impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21482    fn default() -> Self {
21483        Self::DEFAULT.clone()
21484    }
21485}
21486impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21487    type Message = MavMessage;
21488    const ID: u32 = 12901u32;
21489    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21490    const EXTRA_CRC: u8 = 254u8;
21491    const ENCODED_LEN: usize = 59usize;
21492    fn deser(
21493        _version: MavlinkVersion,
21494        __input: &[u8],
21495    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21496        let avail_len = __input.len();
21497        let mut payload_buf = [0; Self::ENCODED_LEN];
21498        let mut buf = if avail_len < Self::ENCODED_LEN {
21499            payload_buf[0..avail_len].copy_from_slice(__input);
21500            Bytes::new(&payload_buf)
21501        } else {
21502            Bytes::new(__input)
21503        };
21504        let mut __struct = Self::default();
21505        __struct.latitude = buf.get_i32_le();
21506        __struct.longitude = buf.get_i32_le();
21507        __struct.altitude_barometric = buf.get_f32_le();
21508        __struct.altitude_geodetic = buf.get_f32_le();
21509        __struct.height = buf.get_f32_le();
21510        __struct.timestamp = buf.get_f32_le();
21511        __struct.direction = buf.get_u16_le();
21512        __struct.speed_horizontal = buf.get_u16_le();
21513        __struct.speed_vertical = buf.get_i16_le();
21514        __struct.target_system = buf.get_u8();
21515        __struct.target_component = buf.get_u8();
21516        for v in &mut __struct.id_or_mac {
21517            let val = buf.get_u8();
21518            *v = val;
21519        }
21520        let tmp = buf.get_u8();
21521        __struct.status =
21522            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21523                enum_type: "MavOdidStatus",
21524                value: tmp as u32,
21525            })?;
21526        let tmp = buf.get_u8();
21527        __struct.height_reference =
21528            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21529                enum_type: "MavOdidHeightRef",
21530                value: tmp as u32,
21531            })?;
21532        let tmp = buf.get_u8();
21533        __struct.horizontal_accuracy =
21534            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21535                enum_type: "MavOdidHorAcc",
21536                value: tmp as u32,
21537            })?;
21538        let tmp = buf.get_u8();
21539        __struct.vertical_accuracy =
21540            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21541                enum_type: "MavOdidVerAcc",
21542                value: tmp as u32,
21543            })?;
21544        let tmp = buf.get_u8();
21545        __struct.barometer_accuracy =
21546            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21547                enum_type: "MavOdidVerAcc",
21548                value: tmp as u32,
21549            })?;
21550        let tmp = buf.get_u8();
21551        __struct.speed_accuracy =
21552            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21553                enum_type: "MavOdidSpeedAcc",
21554                value: tmp as u32,
21555            })?;
21556        let tmp = buf.get_u8();
21557        __struct.timestamp_accuracy =
21558            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21559                enum_type: "MavOdidTimeAcc",
21560                value: tmp as u32,
21561            })?;
21562        Ok(__struct)
21563    }
21564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21565        let mut __tmp = BytesMut::new(bytes);
21566        #[allow(clippy::absurd_extreme_comparisons)]
21567        #[allow(unused_comparisons)]
21568        if __tmp.remaining() < Self::ENCODED_LEN {
21569            panic!(
21570                "buffer is too small (need {} bytes, but got {})",
21571                Self::ENCODED_LEN,
21572                __tmp.remaining(),
21573            )
21574        }
21575        __tmp.put_i32_le(self.latitude);
21576        __tmp.put_i32_le(self.longitude);
21577        __tmp.put_f32_le(self.altitude_barometric);
21578        __tmp.put_f32_le(self.altitude_geodetic);
21579        __tmp.put_f32_le(self.height);
21580        __tmp.put_f32_le(self.timestamp);
21581        __tmp.put_u16_le(self.direction);
21582        __tmp.put_u16_le(self.speed_horizontal);
21583        __tmp.put_i16_le(self.speed_vertical);
21584        __tmp.put_u8(self.target_system);
21585        __tmp.put_u8(self.target_component);
21586        for val in &self.id_or_mac {
21587            __tmp.put_u8(*val);
21588        }
21589        __tmp.put_u8(self.status as u8);
21590        __tmp.put_u8(self.height_reference as u8);
21591        __tmp.put_u8(self.horizontal_accuracy as u8);
21592        __tmp.put_u8(self.vertical_accuracy as u8);
21593        __tmp.put_u8(self.barometer_accuracy as u8);
21594        __tmp.put_u8(self.speed_accuracy as u8);
21595        __tmp.put_u8(self.timestamp_accuracy as u8);
21596        if matches!(version, MavlinkVersion::V2) {
21597            let len = __tmp.len();
21598            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21599        } else {
21600            __tmp.len()
21601        }
21602    }
21603}
21604#[doc = "id: 12915"]
21605#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
21606#[derive(Debug, Clone, PartialEq)]
21607#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21608#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21609pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21610    #[doc = "System ID (0 for broadcast)."]
21611    pub target_system: u8,
21612    #[doc = "Component ID (0 for broadcast)."]
21613    pub target_component: u8,
21614    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21615    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21616    pub id_or_mac: [u8; 20],
21617    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
21618    pub single_message_size: u8,
21619    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
21620    pub msg_pack_size: u8,
21621    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
21622    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21623    pub messages: [u8; 225],
21624}
21625impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21626    pub const ENCODED_LEN: usize = 249usize;
21627    pub const DEFAULT: Self = Self {
21628        target_system: 0_u8,
21629        target_component: 0_u8,
21630        id_or_mac: [0_u8; 20usize],
21631        single_message_size: 0_u8,
21632        msg_pack_size: 0_u8,
21633        messages: [0_u8; 225usize],
21634    };
21635    #[cfg(feature = "arbitrary")]
21636    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21637        use arbitrary::{Arbitrary, Unstructured};
21638        let mut buf = [0u8; 1024];
21639        rng.fill_bytes(&mut buf);
21640        let mut unstructured = Unstructured::new(&buf);
21641        Self::arbitrary(&mut unstructured).unwrap_or_default()
21642    }
21643}
21644impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21645    fn default() -> Self {
21646        Self::DEFAULT.clone()
21647    }
21648}
21649impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21650    type Message = MavMessage;
21651    const ID: u32 = 12915u32;
21652    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
21653    const EXTRA_CRC: u8 = 94u8;
21654    const ENCODED_LEN: usize = 249usize;
21655    fn deser(
21656        _version: MavlinkVersion,
21657        __input: &[u8],
21658    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21659        let avail_len = __input.len();
21660        let mut payload_buf = [0; Self::ENCODED_LEN];
21661        let mut buf = if avail_len < Self::ENCODED_LEN {
21662            payload_buf[0..avail_len].copy_from_slice(__input);
21663            Bytes::new(&payload_buf)
21664        } else {
21665            Bytes::new(__input)
21666        };
21667        let mut __struct = Self::default();
21668        __struct.target_system = buf.get_u8();
21669        __struct.target_component = buf.get_u8();
21670        for v in &mut __struct.id_or_mac {
21671            let val = buf.get_u8();
21672            *v = val;
21673        }
21674        __struct.single_message_size = buf.get_u8();
21675        __struct.msg_pack_size = buf.get_u8();
21676        for v in &mut __struct.messages {
21677            let val = buf.get_u8();
21678            *v = val;
21679        }
21680        Ok(__struct)
21681    }
21682    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21683        let mut __tmp = BytesMut::new(bytes);
21684        #[allow(clippy::absurd_extreme_comparisons)]
21685        #[allow(unused_comparisons)]
21686        if __tmp.remaining() < Self::ENCODED_LEN {
21687            panic!(
21688                "buffer is too small (need {} bytes, but got {})",
21689                Self::ENCODED_LEN,
21690                __tmp.remaining(),
21691            )
21692        }
21693        __tmp.put_u8(self.target_system);
21694        __tmp.put_u8(self.target_component);
21695        for val in &self.id_or_mac {
21696            __tmp.put_u8(*val);
21697        }
21698        __tmp.put_u8(self.single_message_size);
21699        __tmp.put_u8(self.msg_pack_size);
21700        for val in &self.messages {
21701            __tmp.put_u8(*val);
21702        }
21703        if matches!(version, MavlinkVersion::V2) {
21704            let len = __tmp.len();
21705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21706        } else {
21707            __tmp.len()
21708        }
21709    }
21710}
21711#[doc = "id: 12905"]
21712#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
21713#[derive(Debug, Clone, PartialEq)]
21714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21716pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
21717    #[doc = "System ID (0 for broadcast)."]
21718    pub target_system: u8,
21719    #[doc = "Component ID (0 for broadcast)."]
21720    pub target_component: u8,
21721    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21722    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21723    pub id_or_mac: [u8; 20],
21724    #[doc = "Indicates the type of the operator_id field."]
21725    pub operator_id_type: MavOdidOperatorIdType,
21726    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
21727    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21728    pub operator_id: [u8; 20],
21729}
21730impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
21731    pub const ENCODED_LEN: usize = 43usize;
21732    pub const DEFAULT: Self = Self {
21733        target_system: 0_u8,
21734        target_component: 0_u8,
21735        id_or_mac: [0_u8; 20usize],
21736        operator_id_type: MavOdidOperatorIdType::DEFAULT,
21737        operator_id: [0_u8; 20usize],
21738    };
21739    #[cfg(feature = "arbitrary")]
21740    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21741        use arbitrary::{Arbitrary, Unstructured};
21742        let mut buf = [0u8; 1024];
21743        rng.fill_bytes(&mut buf);
21744        let mut unstructured = Unstructured::new(&buf);
21745        Self::arbitrary(&mut unstructured).unwrap_or_default()
21746    }
21747}
21748impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
21749    fn default() -> Self {
21750        Self::DEFAULT.clone()
21751    }
21752}
21753impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
21754    type Message = MavMessage;
21755    const ID: u32 = 12905u32;
21756    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
21757    const EXTRA_CRC: u8 = 49u8;
21758    const ENCODED_LEN: usize = 43usize;
21759    fn deser(
21760        _version: MavlinkVersion,
21761        __input: &[u8],
21762    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21763        let avail_len = __input.len();
21764        let mut payload_buf = [0; Self::ENCODED_LEN];
21765        let mut buf = if avail_len < Self::ENCODED_LEN {
21766            payload_buf[0..avail_len].copy_from_slice(__input);
21767            Bytes::new(&payload_buf)
21768        } else {
21769            Bytes::new(__input)
21770        };
21771        let mut __struct = Self::default();
21772        __struct.target_system = buf.get_u8();
21773        __struct.target_component = buf.get_u8();
21774        for v in &mut __struct.id_or_mac {
21775            let val = buf.get_u8();
21776            *v = val;
21777        }
21778        let tmp = buf.get_u8();
21779        __struct.operator_id_type =
21780            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21781                enum_type: "MavOdidOperatorIdType",
21782                value: tmp as u32,
21783            })?;
21784        for v in &mut __struct.operator_id {
21785            let val = buf.get_u8();
21786            *v = val;
21787        }
21788        Ok(__struct)
21789    }
21790    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21791        let mut __tmp = BytesMut::new(bytes);
21792        #[allow(clippy::absurd_extreme_comparisons)]
21793        #[allow(unused_comparisons)]
21794        if __tmp.remaining() < Self::ENCODED_LEN {
21795            panic!(
21796                "buffer is too small (need {} bytes, but got {})",
21797                Self::ENCODED_LEN,
21798                __tmp.remaining(),
21799            )
21800        }
21801        __tmp.put_u8(self.target_system);
21802        __tmp.put_u8(self.target_component);
21803        for val in &self.id_or_mac {
21804            __tmp.put_u8(*val);
21805        }
21806        __tmp.put_u8(self.operator_id_type as u8);
21807        for val in &self.operator_id {
21808            __tmp.put_u8(*val);
21809        }
21810        if matches!(version, MavlinkVersion::V2) {
21811            let len = __tmp.len();
21812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21813        } else {
21814            __tmp.len()
21815        }
21816    }
21817}
21818#[doc = "id: 12903"]
21819#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
21820#[derive(Debug, Clone, PartialEq)]
21821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21822#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21823pub struct OPEN_DRONE_ID_SELF_ID_DATA {
21824    #[doc = "System ID (0 for broadcast)."]
21825    pub target_system: u8,
21826    #[doc = "Component ID (0 for broadcast)."]
21827    pub target_component: u8,
21828    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21830    pub id_or_mac: [u8; 20],
21831    #[doc = "Indicates the type of the description field."]
21832    pub description_type: MavOdidDescType,
21833    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
21834    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21835    pub description: [u8; 23],
21836}
21837impl OPEN_DRONE_ID_SELF_ID_DATA {
21838    pub const ENCODED_LEN: usize = 46usize;
21839    pub const DEFAULT: Self = Self {
21840        target_system: 0_u8,
21841        target_component: 0_u8,
21842        id_or_mac: [0_u8; 20usize],
21843        description_type: MavOdidDescType::DEFAULT,
21844        description: [0_u8; 23usize],
21845    };
21846    #[cfg(feature = "arbitrary")]
21847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21848        use arbitrary::{Arbitrary, Unstructured};
21849        let mut buf = [0u8; 1024];
21850        rng.fill_bytes(&mut buf);
21851        let mut unstructured = Unstructured::new(&buf);
21852        Self::arbitrary(&mut unstructured).unwrap_or_default()
21853    }
21854}
21855impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
21856    fn default() -> Self {
21857        Self::DEFAULT.clone()
21858    }
21859}
21860impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
21861    type Message = MavMessage;
21862    const ID: u32 = 12903u32;
21863    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
21864    const EXTRA_CRC: u8 = 249u8;
21865    const ENCODED_LEN: usize = 46usize;
21866    fn deser(
21867        _version: MavlinkVersion,
21868        __input: &[u8],
21869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21870        let avail_len = __input.len();
21871        let mut payload_buf = [0; Self::ENCODED_LEN];
21872        let mut buf = if avail_len < Self::ENCODED_LEN {
21873            payload_buf[0..avail_len].copy_from_slice(__input);
21874            Bytes::new(&payload_buf)
21875        } else {
21876            Bytes::new(__input)
21877        };
21878        let mut __struct = Self::default();
21879        __struct.target_system = buf.get_u8();
21880        __struct.target_component = buf.get_u8();
21881        for v in &mut __struct.id_or_mac {
21882            let val = buf.get_u8();
21883            *v = val;
21884        }
21885        let tmp = buf.get_u8();
21886        __struct.description_type =
21887            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21888                enum_type: "MavOdidDescType",
21889                value: tmp as u32,
21890            })?;
21891        for v in &mut __struct.description {
21892            let val = buf.get_u8();
21893            *v = val;
21894        }
21895        Ok(__struct)
21896    }
21897    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21898        let mut __tmp = BytesMut::new(bytes);
21899        #[allow(clippy::absurd_extreme_comparisons)]
21900        #[allow(unused_comparisons)]
21901        if __tmp.remaining() < Self::ENCODED_LEN {
21902            panic!(
21903                "buffer is too small (need {} bytes, but got {})",
21904                Self::ENCODED_LEN,
21905                __tmp.remaining(),
21906            )
21907        }
21908        __tmp.put_u8(self.target_system);
21909        __tmp.put_u8(self.target_component);
21910        for val in &self.id_or_mac {
21911            __tmp.put_u8(*val);
21912        }
21913        __tmp.put_u8(self.description_type as u8);
21914        for val in &self.description {
21915            __tmp.put_u8(*val);
21916        }
21917        if matches!(version, MavlinkVersion::V2) {
21918            let len = __tmp.len();
21919            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21920        } else {
21921            __tmp.len()
21922        }
21923    }
21924}
21925#[doc = "id: 12904"]
21926#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
21927#[derive(Debug, Clone, PartialEq)]
21928#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21929#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21930pub struct OPEN_DRONE_ID_SYSTEM_DATA {
21931    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
21932    pub operator_latitude: i32,
21933    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
21934    pub operator_longitude: i32,
21935    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21936    pub area_ceiling: f32,
21937    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21938    pub area_floor: f32,
21939    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
21940    pub operator_altitude_geo: f32,
21941    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21942    pub timestamp: u32,
21943    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
21944    pub area_count: u16,
21945    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
21946    pub area_radius: u16,
21947    #[doc = "System ID (0 for broadcast)."]
21948    pub target_system: u8,
21949    #[doc = "Component ID (0 for broadcast)."]
21950    pub target_component: u8,
21951    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21952    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21953    pub id_or_mac: [u8; 20],
21954    #[doc = "Specifies the operator location type."]
21955    pub operator_location_type: MavOdidOperatorLocationType,
21956    #[doc = "Specifies the classification type of the UA."]
21957    pub classification_type: MavOdidClassificationType,
21958    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
21959    pub category_eu: MavOdidCategoryEu,
21960    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
21961    pub class_eu: MavOdidClassEu,
21962}
21963impl OPEN_DRONE_ID_SYSTEM_DATA {
21964    pub const ENCODED_LEN: usize = 54usize;
21965    pub const DEFAULT: Self = Self {
21966        operator_latitude: 0_i32,
21967        operator_longitude: 0_i32,
21968        area_ceiling: 0.0_f32,
21969        area_floor: 0.0_f32,
21970        operator_altitude_geo: 0.0_f32,
21971        timestamp: 0_u32,
21972        area_count: 0_u16,
21973        area_radius: 0_u16,
21974        target_system: 0_u8,
21975        target_component: 0_u8,
21976        id_or_mac: [0_u8; 20usize],
21977        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
21978        classification_type: MavOdidClassificationType::DEFAULT,
21979        category_eu: MavOdidCategoryEu::DEFAULT,
21980        class_eu: MavOdidClassEu::DEFAULT,
21981    };
21982    #[cfg(feature = "arbitrary")]
21983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21984        use arbitrary::{Arbitrary, Unstructured};
21985        let mut buf = [0u8; 1024];
21986        rng.fill_bytes(&mut buf);
21987        let mut unstructured = Unstructured::new(&buf);
21988        Self::arbitrary(&mut unstructured).unwrap_or_default()
21989    }
21990}
21991impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
21992    fn default() -> Self {
21993        Self::DEFAULT.clone()
21994    }
21995}
21996impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
21997    type Message = MavMessage;
21998    const ID: u32 = 12904u32;
21999    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
22000    const EXTRA_CRC: u8 = 77u8;
22001    const ENCODED_LEN: usize = 54usize;
22002    fn deser(
22003        _version: MavlinkVersion,
22004        __input: &[u8],
22005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22006        let avail_len = __input.len();
22007        let mut payload_buf = [0; Self::ENCODED_LEN];
22008        let mut buf = if avail_len < Self::ENCODED_LEN {
22009            payload_buf[0..avail_len].copy_from_slice(__input);
22010            Bytes::new(&payload_buf)
22011        } else {
22012            Bytes::new(__input)
22013        };
22014        let mut __struct = Self::default();
22015        __struct.operator_latitude = buf.get_i32_le();
22016        __struct.operator_longitude = buf.get_i32_le();
22017        __struct.area_ceiling = buf.get_f32_le();
22018        __struct.area_floor = buf.get_f32_le();
22019        __struct.operator_altitude_geo = buf.get_f32_le();
22020        __struct.timestamp = buf.get_u32_le();
22021        __struct.area_count = buf.get_u16_le();
22022        __struct.area_radius = buf.get_u16_le();
22023        __struct.target_system = buf.get_u8();
22024        __struct.target_component = buf.get_u8();
22025        for v in &mut __struct.id_or_mac {
22026            let val = buf.get_u8();
22027            *v = val;
22028        }
22029        let tmp = buf.get_u8();
22030        __struct.operator_location_type =
22031            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22032                enum_type: "MavOdidOperatorLocationType",
22033                value: tmp as u32,
22034            })?;
22035        let tmp = buf.get_u8();
22036        __struct.classification_type =
22037            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22038                enum_type: "MavOdidClassificationType",
22039                value: tmp as u32,
22040            })?;
22041        let tmp = buf.get_u8();
22042        __struct.category_eu =
22043            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22044                enum_type: "MavOdidCategoryEu",
22045                value: tmp as u32,
22046            })?;
22047        let tmp = buf.get_u8();
22048        __struct.class_eu =
22049            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22050                enum_type: "MavOdidClassEu",
22051                value: tmp as u32,
22052            })?;
22053        Ok(__struct)
22054    }
22055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22056        let mut __tmp = BytesMut::new(bytes);
22057        #[allow(clippy::absurd_extreme_comparisons)]
22058        #[allow(unused_comparisons)]
22059        if __tmp.remaining() < Self::ENCODED_LEN {
22060            panic!(
22061                "buffer is too small (need {} bytes, but got {})",
22062                Self::ENCODED_LEN,
22063                __tmp.remaining(),
22064            )
22065        }
22066        __tmp.put_i32_le(self.operator_latitude);
22067        __tmp.put_i32_le(self.operator_longitude);
22068        __tmp.put_f32_le(self.area_ceiling);
22069        __tmp.put_f32_le(self.area_floor);
22070        __tmp.put_f32_le(self.operator_altitude_geo);
22071        __tmp.put_u32_le(self.timestamp);
22072        __tmp.put_u16_le(self.area_count);
22073        __tmp.put_u16_le(self.area_radius);
22074        __tmp.put_u8(self.target_system);
22075        __tmp.put_u8(self.target_component);
22076        for val in &self.id_or_mac {
22077            __tmp.put_u8(*val);
22078        }
22079        __tmp.put_u8(self.operator_location_type as u8);
22080        __tmp.put_u8(self.classification_type as u8);
22081        __tmp.put_u8(self.category_eu as u8);
22082        __tmp.put_u8(self.class_eu as u8);
22083        if matches!(version, MavlinkVersion::V2) {
22084            let len = __tmp.len();
22085            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22086        } else {
22087            __tmp.len()
22088        }
22089    }
22090}
22091#[doc = "id: 12919"]
22092#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
22093#[derive(Debug, Clone, PartialEq)]
22094#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22095#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22096pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22097    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
22098    pub operator_latitude: i32,
22099    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
22100    pub operator_longitude: i32,
22101    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
22102    pub operator_altitude_geo: f32,
22103    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
22104    pub timestamp: u32,
22105    #[doc = "System ID (0 for broadcast)."]
22106    pub target_system: u8,
22107    #[doc = "Component ID (0 for broadcast)."]
22108    pub target_component: u8,
22109}
22110impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22111    pub const ENCODED_LEN: usize = 18usize;
22112    pub const DEFAULT: Self = Self {
22113        operator_latitude: 0_i32,
22114        operator_longitude: 0_i32,
22115        operator_altitude_geo: 0.0_f32,
22116        timestamp: 0_u32,
22117        target_system: 0_u8,
22118        target_component: 0_u8,
22119    };
22120    #[cfg(feature = "arbitrary")]
22121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22122        use arbitrary::{Arbitrary, Unstructured};
22123        let mut buf = [0u8; 1024];
22124        rng.fill_bytes(&mut buf);
22125        let mut unstructured = Unstructured::new(&buf);
22126        Self::arbitrary(&mut unstructured).unwrap_or_default()
22127    }
22128}
22129impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22130    fn default() -> Self {
22131        Self::DEFAULT.clone()
22132    }
22133}
22134impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
22135    type Message = MavMessage;
22136    const ID: u32 = 12919u32;
22137    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
22138    const EXTRA_CRC: u8 = 7u8;
22139    const ENCODED_LEN: usize = 18usize;
22140    fn deser(
22141        _version: MavlinkVersion,
22142        __input: &[u8],
22143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22144        let avail_len = __input.len();
22145        let mut payload_buf = [0; Self::ENCODED_LEN];
22146        let mut buf = if avail_len < Self::ENCODED_LEN {
22147            payload_buf[0..avail_len].copy_from_slice(__input);
22148            Bytes::new(&payload_buf)
22149        } else {
22150            Bytes::new(__input)
22151        };
22152        let mut __struct = Self::default();
22153        __struct.operator_latitude = buf.get_i32_le();
22154        __struct.operator_longitude = buf.get_i32_le();
22155        __struct.operator_altitude_geo = buf.get_f32_le();
22156        __struct.timestamp = buf.get_u32_le();
22157        __struct.target_system = buf.get_u8();
22158        __struct.target_component = buf.get_u8();
22159        Ok(__struct)
22160    }
22161    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22162        let mut __tmp = BytesMut::new(bytes);
22163        #[allow(clippy::absurd_extreme_comparisons)]
22164        #[allow(unused_comparisons)]
22165        if __tmp.remaining() < Self::ENCODED_LEN {
22166            panic!(
22167                "buffer is too small (need {} bytes, but got {})",
22168                Self::ENCODED_LEN,
22169                __tmp.remaining(),
22170            )
22171        }
22172        __tmp.put_i32_le(self.operator_latitude);
22173        __tmp.put_i32_le(self.operator_longitude);
22174        __tmp.put_f32_le(self.operator_altitude_geo);
22175        __tmp.put_u32_le(self.timestamp);
22176        __tmp.put_u8(self.target_system);
22177        __tmp.put_u8(self.target_component);
22178        if matches!(version, MavlinkVersion::V2) {
22179            let len = __tmp.len();
22180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22181        } else {
22182            __tmp.len()
22183        }
22184    }
22185}
22186#[doc = "id: 100"]
22187#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
22188#[derive(Debug, Clone, PartialEq)]
22189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22191pub struct OPTICAL_FLOW_DATA {
22192    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22193    pub time_usec: u64,
22194    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
22195    pub flow_comp_m_x: f32,
22196    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
22197    pub flow_comp_m_y: f32,
22198    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
22199    pub ground_distance: f32,
22200    #[doc = "Flow in x-sensor direction"]
22201    pub flow_x: i16,
22202    #[doc = "Flow in y-sensor direction"]
22203    pub flow_y: i16,
22204    #[doc = "Sensor ID"]
22205    pub sensor_id: u8,
22206    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
22207    pub quality: u8,
22208    #[doc = "Flow rate about X axis"]
22209    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22210    pub flow_rate_x: f32,
22211    #[doc = "Flow rate about Y axis"]
22212    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
22213    pub flow_rate_y: f32,
22214}
22215impl OPTICAL_FLOW_DATA {
22216    pub const ENCODED_LEN: usize = 34usize;
22217    pub const DEFAULT: Self = Self {
22218        time_usec: 0_u64,
22219        flow_comp_m_x: 0.0_f32,
22220        flow_comp_m_y: 0.0_f32,
22221        ground_distance: 0.0_f32,
22222        flow_x: 0_i16,
22223        flow_y: 0_i16,
22224        sensor_id: 0_u8,
22225        quality: 0_u8,
22226        flow_rate_x: 0.0_f32,
22227        flow_rate_y: 0.0_f32,
22228    };
22229    #[cfg(feature = "arbitrary")]
22230    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22231        use arbitrary::{Arbitrary, Unstructured};
22232        let mut buf = [0u8; 1024];
22233        rng.fill_bytes(&mut buf);
22234        let mut unstructured = Unstructured::new(&buf);
22235        Self::arbitrary(&mut unstructured).unwrap_or_default()
22236    }
22237}
22238impl Default for OPTICAL_FLOW_DATA {
22239    fn default() -> Self {
22240        Self::DEFAULT.clone()
22241    }
22242}
22243impl MessageData for OPTICAL_FLOW_DATA {
22244    type Message = MavMessage;
22245    const ID: u32 = 100u32;
22246    const NAME: &'static str = "OPTICAL_FLOW";
22247    const EXTRA_CRC: u8 = 175u8;
22248    const ENCODED_LEN: usize = 34usize;
22249    fn deser(
22250        _version: MavlinkVersion,
22251        __input: &[u8],
22252    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22253        let avail_len = __input.len();
22254        let mut payload_buf = [0; Self::ENCODED_LEN];
22255        let mut buf = if avail_len < Self::ENCODED_LEN {
22256            payload_buf[0..avail_len].copy_from_slice(__input);
22257            Bytes::new(&payload_buf)
22258        } else {
22259            Bytes::new(__input)
22260        };
22261        let mut __struct = Self::default();
22262        __struct.time_usec = buf.get_u64_le();
22263        __struct.flow_comp_m_x = buf.get_f32_le();
22264        __struct.flow_comp_m_y = buf.get_f32_le();
22265        __struct.ground_distance = buf.get_f32_le();
22266        __struct.flow_x = buf.get_i16_le();
22267        __struct.flow_y = buf.get_i16_le();
22268        __struct.sensor_id = buf.get_u8();
22269        __struct.quality = buf.get_u8();
22270        __struct.flow_rate_x = buf.get_f32_le();
22271        __struct.flow_rate_y = buf.get_f32_le();
22272        Ok(__struct)
22273    }
22274    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22275        let mut __tmp = BytesMut::new(bytes);
22276        #[allow(clippy::absurd_extreme_comparisons)]
22277        #[allow(unused_comparisons)]
22278        if __tmp.remaining() < Self::ENCODED_LEN {
22279            panic!(
22280                "buffer is too small (need {} bytes, but got {})",
22281                Self::ENCODED_LEN,
22282                __tmp.remaining(),
22283            )
22284        }
22285        __tmp.put_u64_le(self.time_usec);
22286        __tmp.put_f32_le(self.flow_comp_m_x);
22287        __tmp.put_f32_le(self.flow_comp_m_y);
22288        __tmp.put_f32_le(self.ground_distance);
22289        __tmp.put_i16_le(self.flow_x);
22290        __tmp.put_i16_le(self.flow_y);
22291        __tmp.put_u8(self.sensor_id);
22292        __tmp.put_u8(self.quality);
22293        __tmp.put_f32_le(self.flow_rate_x);
22294        __tmp.put_f32_le(self.flow_rate_y);
22295        if matches!(version, MavlinkVersion::V2) {
22296            let len = __tmp.len();
22297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22298        } else {
22299            __tmp.len()
22300        }
22301    }
22302}
22303#[doc = "id: 106"]
22304#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22305#[derive(Debug, Clone, PartialEq)]
22306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22308pub struct OPTICAL_FLOW_RAD_DATA {
22309    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22310    pub time_usec: u64,
22311    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22312    pub integration_time_us: u32,
22313    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22314    pub integrated_x: f32,
22315    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22316    pub integrated_y: f32,
22317    #[doc = "RH rotation around X axis"]
22318    pub integrated_xgyro: f32,
22319    #[doc = "RH rotation around Y axis"]
22320    pub integrated_ygyro: f32,
22321    #[doc = "RH rotation around Z axis"]
22322    pub integrated_zgyro: f32,
22323    #[doc = "Time since the distance was sampled."]
22324    pub time_delta_distance_us: u32,
22325    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22326    pub distance: f32,
22327    #[doc = "Temperature"]
22328    pub temperature: i16,
22329    #[doc = "Sensor ID"]
22330    pub sensor_id: u8,
22331    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22332    pub quality: u8,
22333}
22334impl OPTICAL_FLOW_RAD_DATA {
22335    pub const ENCODED_LEN: usize = 44usize;
22336    pub const DEFAULT: Self = Self {
22337        time_usec: 0_u64,
22338        integration_time_us: 0_u32,
22339        integrated_x: 0.0_f32,
22340        integrated_y: 0.0_f32,
22341        integrated_xgyro: 0.0_f32,
22342        integrated_ygyro: 0.0_f32,
22343        integrated_zgyro: 0.0_f32,
22344        time_delta_distance_us: 0_u32,
22345        distance: 0.0_f32,
22346        temperature: 0_i16,
22347        sensor_id: 0_u8,
22348        quality: 0_u8,
22349    };
22350    #[cfg(feature = "arbitrary")]
22351    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22352        use arbitrary::{Arbitrary, Unstructured};
22353        let mut buf = [0u8; 1024];
22354        rng.fill_bytes(&mut buf);
22355        let mut unstructured = Unstructured::new(&buf);
22356        Self::arbitrary(&mut unstructured).unwrap_or_default()
22357    }
22358}
22359impl Default for OPTICAL_FLOW_RAD_DATA {
22360    fn default() -> Self {
22361        Self::DEFAULT.clone()
22362    }
22363}
22364impl MessageData for OPTICAL_FLOW_RAD_DATA {
22365    type Message = MavMessage;
22366    const ID: u32 = 106u32;
22367    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22368    const EXTRA_CRC: u8 = 138u8;
22369    const ENCODED_LEN: usize = 44usize;
22370    fn deser(
22371        _version: MavlinkVersion,
22372        __input: &[u8],
22373    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22374        let avail_len = __input.len();
22375        let mut payload_buf = [0; Self::ENCODED_LEN];
22376        let mut buf = if avail_len < Self::ENCODED_LEN {
22377            payload_buf[0..avail_len].copy_from_slice(__input);
22378            Bytes::new(&payload_buf)
22379        } else {
22380            Bytes::new(__input)
22381        };
22382        let mut __struct = Self::default();
22383        __struct.time_usec = buf.get_u64_le();
22384        __struct.integration_time_us = buf.get_u32_le();
22385        __struct.integrated_x = buf.get_f32_le();
22386        __struct.integrated_y = buf.get_f32_le();
22387        __struct.integrated_xgyro = buf.get_f32_le();
22388        __struct.integrated_ygyro = buf.get_f32_le();
22389        __struct.integrated_zgyro = buf.get_f32_le();
22390        __struct.time_delta_distance_us = buf.get_u32_le();
22391        __struct.distance = buf.get_f32_le();
22392        __struct.temperature = buf.get_i16_le();
22393        __struct.sensor_id = buf.get_u8();
22394        __struct.quality = buf.get_u8();
22395        Ok(__struct)
22396    }
22397    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22398        let mut __tmp = BytesMut::new(bytes);
22399        #[allow(clippy::absurd_extreme_comparisons)]
22400        #[allow(unused_comparisons)]
22401        if __tmp.remaining() < Self::ENCODED_LEN {
22402            panic!(
22403                "buffer is too small (need {} bytes, but got {})",
22404                Self::ENCODED_LEN,
22405                __tmp.remaining(),
22406            )
22407        }
22408        __tmp.put_u64_le(self.time_usec);
22409        __tmp.put_u32_le(self.integration_time_us);
22410        __tmp.put_f32_le(self.integrated_x);
22411        __tmp.put_f32_le(self.integrated_y);
22412        __tmp.put_f32_le(self.integrated_xgyro);
22413        __tmp.put_f32_le(self.integrated_ygyro);
22414        __tmp.put_f32_le(self.integrated_zgyro);
22415        __tmp.put_u32_le(self.time_delta_distance_us);
22416        __tmp.put_f32_le(self.distance);
22417        __tmp.put_i16_le(self.temperature);
22418        __tmp.put_u8(self.sensor_id);
22419        __tmp.put_u8(self.quality);
22420        if matches!(version, MavlinkVersion::V2) {
22421            let len = __tmp.len();
22422            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22423        } else {
22424            __tmp.len()
22425        }
22426    }
22427}
22428#[doc = "id: 360"]
22429#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22430#[derive(Debug, Clone, PartialEq)]
22431#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22432#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22433pub struct ORBIT_EXECUTION_STATUS_DATA {
22434    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22435    pub time_usec: u64,
22436    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22437    pub radius: f32,
22438    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22439    pub x: i32,
22440    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22441    pub y: i32,
22442    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22443    pub z: f32,
22444    #[doc = "The coordinate system of the fields: x, y, z."]
22445    pub frame: MavFrame,
22446}
22447impl ORBIT_EXECUTION_STATUS_DATA {
22448    pub const ENCODED_LEN: usize = 25usize;
22449    pub const DEFAULT: Self = Self {
22450        time_usec: 0_u64,
22451        radius: 0.0_f32,
22452        x: 0_i32,
22453        y: 0_i32,
22454        z: 0.0_f32,
22455        frame: MavFrame::DEFAULT,
22456    };
22457    #[cfg(feature = "arbitrary")]
22458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22459        use arbitrary::{Arbitrary, Unstructured};
22460        let mut buf = [0u8; 1024];
22461        rng.fill_bytes(&mut buf);
22462        let mut unstructured = Unstructured::new(&buf);
22463        Self::arbitrary(&mut unstructured).unwrap_or_default()
22464    }
22465}
22466impl Default for ORBIT_EXECUTION_STATUS_DATA {
22467    fn default() -> Self {
22468        Self::DEFAULT.clone()
22469    }
22470}
22471impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22472    type Message = MavMessage;
22473    const ID: u32 = 360u32;
22474    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22475    const EXTRA_CRC: u8 = 11u8;
22476    const ENCODED_LEN: usize = 25usize;
22477    fn deser(
22478        _version: MavlinkVersion,
22479        __input: &[u8],
22480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22481        let avail_len = __input.len();
22482        let mut payload_buf = [0; Self::ENCODED_LEN];
22483        let mut buf = if avail_len < Self::ENCODED_LEN {
22484            payload_buf[0..avail_len].copy_from_slice(__input);
22485            Bytes::new(&payload_buf)
22486        } else {
22487            Bytes::new(__input)
22488        };
22489        let mut __struct = Self::default();
22490        __struct.time_usec = buf.get_u64_le();
22491        __struct.radius = buf.get_f32_le();
22492        __struct.x = buf.get_i32_le();
22493        __struct.y = buf.get_i32_le();
22494        __struct.z = buf.get_f32_le();
22495        let tmp = buf.get_u8();
22496        __struct.frame =
22497            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22498                enum_type: "MavFrame",
22499                value: tmp as u32,
22500            })?;
22501        Ok(__struct)
22502    }
22503    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22504        let mut __tmp = BytesMut::new(bytes);
22505        #[allow(clippy::absurd_extreme_comparisons)]
22506        #[allow(unused_comparisons)]
22507        if __tmp.remaining() < Self::ENCODED_LEN {
22508            panic!(
22509                "buffer is too small (need {} bytes, but got {})",
22510                Self::ENCODED_LEN,
22511                __tmp.remaining(),
22512            )
22513        }
22514        __tmp.put_u64_le(self.time_usec);
22515        __tmp.put_f32_le(self.radius);
22516        __tmp.put_i32_le(self.x);
22517        __tmp.put_i32_le(self.y);
22518        __tmp.put_f32_le(self.z);
22519        __tmp.put_u8(self.frame as u8);
22520        if matches!(version, MavlinkVersion::V2) {
22521            let len = __tmp.len();
22522            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22523        } else {
22524            __tmp.len()
22525        }
22526    }
22527}
22528#[doc = "id: 324"]
22529#[doc = "Response from a PARAM_EXT_SET message."]
22530#[derive(Debug, Clone, PartialEq)]
22531#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22533pub struct PARAM_EXT_ACK_DATA {
22534    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22535    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22536    pub param_id: [u8; 16],
22537    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22538    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22539    pub param_value: [u8; 128],
22540    #[doc = "Parameter type."]
22541    pub param_type: MavParamExtType,
22542    #[doc = "Result code."]
22543    pub param_result: ParamAck,
22544}
22545impl PARAM_EXT_ACK_DATA {
22546    pub const ENCODED_LEN: usize = 146usize;
22547    pub const DEFAULT: Self = Self {
22548        param_id: [0_u8; 16usize],
22549        param_value: [0_u8; 128usize],
22550        param_type: MavParamExtType::DEFAULT,
22551        param_result: ParamAck::DEFAULT,
22552    };
22553    #[cfg(feature = "arbitrary")]
22554    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22555        use arbitrary::{Arbitrary, Unstructured};
22556        let mut buf = [0u8; 1024];
22557        rng.fill_bytes(&mut buf);
22558        let mut unstructured = Unstructured::new(&buf);
22559        Self::arbitrary(&mut unstructured).unwrap_or_default()
22560    }
22561}
22562impl Default for PARAM_EXT_ACK_DATA {
22563    fn default() -> Self {
22564        Self::DEFAULT.clone()
22565    }
22566}
22567impl MessageData for PARAM_EXT_ACK_DATA {
22568    type Message = MavMessage;
22569    const ID: u32 = 324u32;
22570    const NAME: &'static str = "PARAM_EXT_ACK";
22571    const EXTRA_CRC: u8 = 132u8;
22572    const ENCODED_LEN: usize = 146usize;
22573    fn deser(
22574        _version: MavlinkVersion,
22575        __input: &[u8],
22576    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22577        let avail_len = __input.len();
22578        let mut payload_buf = [0; Self::ENCODED_LEN];
22579        let mut buf = if avail_len < Self::ENCODED_LEN {
22580            payload_buf[0..avail_len].copy_from_slice(__input);
22581            Bytes::new(&payload_buf)
22582        } else {
22583            Bytes::new(__input)
22584        };
22585        let mut __struct = Self::default();
22586        for v in &mut __struct.param_id {
22587            let val = buf.get_u8();
22588            *v = val;
22589        }
22590        for v in &mut __struct.param_value {
22591            let val = buf.get_u8();
22592            *v = val;
22593        }
22594        let tmp = buf.get_u8();
22595        __struct.param_type =
22596            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22597                enum_type: "MavParamExtType",
22598                value: tmp as u32,
22599            })?;
22600        let tmp = buf.get_u8();
22601        __struct.param_result =
22602            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22603                enum_type: "ParamAck",
22604                value: tmp as u32,
22605            })?;
22606        Ok(__struct)
22607    }
22608    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22609        let mut __tmp = BytesMut::new(bytes);
22610        #[allow(clippy::absurd_extreme_comparisons)]
22611        #[allow(unused_comparisons)]
22612        if __tmp.remaining() < Self::ENCODED_LEN {
22613            panic!(
22614                "buffer is too small (need {} bytes, but got {})",
22615                Self::ENCODED_LEN,
22616                __tmp.remaining(),
22617            )
22618        }
22619        for val in &self.param_id {
22620            __tmp.put_u8(*val);
22621        }
22622        for val in &self.param_value {
22623            __tmp.put_u8(*val);
22624        }
22625        __tmp.put_u8(self.param_type as u8);
22626        __tmp.put_u8(self.param_result as u8);
22627        if matches!(version, MavlinkVersion::V2) {
22628            let len = __tmp.len();
22629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22630        } else {
22631            __tmp.len()
22632        }
22633    }
22634}
22635#[doc = "id: 321"]
22636#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
22637#[derive(Debug, Clone, PartialEq)]
22638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22640pub struct PARAM_EXT_REQUEST_LIST_DATA {
22641    #[doc = "System ID"]
22642    pub target_system: u8,
22643    #[doc = "Component ID"]
22644    pub target_component: u8,
22645}
22646impl PARAM_EXT_REQUEST_LIST_DATA {
22647    pub const ENCODED_LEN: usize = 2usize;
22648    pub const DEFAULT: Self = Self {
22649        target_system: 0_u8,
22650        target_component: 0_u8,
22651    };
22652    #[cfg(feature = "arbitrary")]
22653    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22654        use arbitrary::{Arbitrary, Unstructured};
22655        let mut buf = [0u8; 1024];
22656        rng.fill_bytes(&mut buf);
22657        let mut unstructured = Unstructured::new(&buf);
22658        Self::arbitrary(&mut unstructured).unwrap_or_default()
22659    }
22660}
22661impl Default for PARAM_EXT_REQUEST_LIST_DATA {
22662    fn default() -> Self {
22663        Self::DEFAULT.clone()
22664    }
22665}
22666impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
22667    type Message = MavMessage;
22668    const ID: u32 = 321u32;
22669    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
22670    const EXTRA_CRC: u8 = 88u8;
22671    const ENCODED_LEN: usize = 2usize;
22672    fn deser(
22673        _version: MavlinkVersion,
22674        __input: &[u8],
22675    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22676        let avail_len = __input.len();
22677        let mut payload_buf = [0; Self::ENCODED_LEN];
22678        let mut buf = if avail_len < Self::ENCODED_LEN {
22679            payload_buf[0..avail_len].copy_from_slice(__input);
22680            Bytes::new(&payload_buf)
22681        } else {
22682            Bytes::new(__input)
22683        };
22684        let mut __struct = Self::default();
22685        __struct.target_system = buf.get_u8();
22686        __struct.target_component = buf.get_u8();
22687        Ok(__struct)
22688    }
22689    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22690        let mut __tmp = BytesMut::new(bytes);
22691        #[allow(clippy::absurd_extreme_comparisons)]
22692        #[allow(unused_comparisons)]
22693        if __tmp.remaining() < Self::ENCODED_LEN {
22694            panic!(
22695                "buffer is too small (need {} bytes, but got {})",
22696                Self::ENCODED_LEN,
22697                __tmp.remaining(),
22698            )
22699        }
22700        __tmp.put_u8(self.target_system);
22701        __tmp.put_u8(self.target_component);
22702        if matches!(version, MavlinkVersion::V2) {
22703            let len = __tmp.len();
22704            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22705        } else {
22706            __tmp.len()
22707        }
22708    }
22709}
22710#[doc = "id: 320"]
22711#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
22712#[derive(Debug, Clone, PartialEq)]
22713#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22714#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22715pub struct PARAM_EXT_REQUEST_READ_DATA {
22716    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
22717    pub param_index: i16,
22718    #[doc = "System ID"]
22719    pub target_system: u8,
22720    #[doc = "Component ID"]
22721    pub target_component: u8,
22722    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22723    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22724    pub param_id: [u8; 16],
22725}
22726impl PARAM_EXT_REQUEST_READ_DATA {
22727    pub const ENCODED_LEN: usize = 20usize;
22728    pub const DEFAULT: Self = Self {
22729        param_index: 0_i16,
22730        target_system: 0_u8,
22731        target_component: 0_u8,
22732        param_id: [0_u8; 16usize],
22733    };
22734    #[cfg(feature = "arbitrary")]
22735    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22736        use arbitrary::{Arbitrary, Unstructured};
22737        let mut buf = [0u8; 1024];
22738        rng.fill_bytes(&mut buf);
22739        let mut unstructured = Unstructured::new(&buf);
22740        Self::arbitrary(&mut unstructured).unwrap_or_default()
22741    }
22742}
22743impl Default for PARAM_EXT_REQUEST_READ_DATA {
22744    fn default() -> Self {
22745        Self::DEFAULT.clone()
22746    }
22747}
22748impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
22749    type Message = MavMessage;
22750    const ID: u32 = 320u32;
22751    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
22752    const EXTRA_CRC: u8 = 243u8;
22753    const ENCODED_LEN: usize = 20usize;
22754    fn deser(
22755        _version: MavlinkVersion,
22756        __input: &[u8],
22757    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22758        let avail_len = __input.len();
22759        let mut payload_buf = [0; Self::ENCODED_LEN];
22760        let mut buf = if avail_len < Self::ENCODED_LEN {
22761            payload_buf[0..avail_len].copy_from_slice(__input);
22762            Bytes::new(&payload_buf)
22763        } else {
22764            Bytes::new(__input)
22765        };
22766        let mut __struct = Self::default();
22767        __struct.param_index = buf.get_i16_le();
22768        __struct.target_system = buf.get_u8();
22769        __struct.target_component = buf.get_u8();
22770        for v in &mut __struct.param_id {
22771            let val = buf.get_u8();
22772            *v = val;
22773        }
22774        Ok(__struct)
22775    }
22776    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22777        let mut __tmp = BytesMut::new(bytes);
22778        #[allow(clippy::absurd_extreme_comparisons)]
22779        #[allow(unused_comparisons)]
22780        if __tmp.remaining() < Self::ENCODED_LEN {
22781            panic!(
22782                "buffer is too small (need {} bytes, but got {})",
22783                Self::ENCODED_LEN,
22784                __tmp.remaining(),
22785            )
22786        }
22787        __tmp.put_i16_le(self.param_index);
22788        __tmp.put_u8(self.target_system);
22789        __tmp.put_u8(self.target_component);
22790        for val in &self.param_id {
22791            __tmp.put_u8(*val);
22792        }
22793        if matches!(version, MavlinkVersion::V2) {
22794            let len = __tmp.len();
22795            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22796        } else {
22797            __tmp.len()
22798        }
22799    }
22800}
22801#[doc = "id: 323"]
22802#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
22803#[derive(Debug, Clone, PartialEq)]
22804#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22805#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22806pub struct PARAM_EXT_SET_DATA {
22807    #[doc = "System ID"]
22808    pub target_system: u8,
22809    #[doc = "Component ID"]
22810    pub target_component: u8,
22811    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22812    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22813    pub param_id: [u8; 16],
22814    #[doc = "Parameter value"]
22815    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22816    pub param_value: [u8; 128],
22817    #[doc = "Parameter type."]
22818    pub param_type: MavParamExtType,
22819}
22820impl PARAM_EXT_SET_DATA {
22821    pub const ENCODED_LEN: usize = 147usize;
22822    pub const DEFAULT: Self = Self {
22823        target_system: 0_u8,
22824        target_component: 0_u8,
22825        param_id: [0_u8; 16usize],
22826        param_value: [0_u8; 128usize],
22827        param_type: MavParamExtType::DEFAULT,
22828    };
22829    #[cfg(feature = "arbitrary")]
22830    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22831        use arbitrary::{Arbitrary, Unstructured};
22832        let mut buf = [0u8; 1024];
22833        rng.fill_bytes(&mut buf);
22834        let mut unstructured = Unstructured::new(&buf);
22835        Self::arbitrary(&mut unstructured).unwrap_or_default()
22836    }
22837}
22838impl Default for PARAM_EXT_SET_DATA {
22839    fn default() -> Self {
22840        Self::DEFAULT.clone()
22841    }
22842}
22843impl MessageData for PARAM_EXT_SET_DATA {
22844    type Message = MavMessage;
22845    const ID: u32 = 323u32;
22846    const NAME: &'static str = "PARAM_EXT_SET";
22847    const EXTRA_CRC: u8 = 78u8;
22848    const ENCODED_LEN: usize = 147usize;
22849    fn deser(
22850        _version: MavlinkVersion,
22851        __input: &[u8],
22852    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22853        let avail_len = __input.len();
22854        let mut payload_buf = [0; Self::ENCODED_LEN];
22855        let mut buf = if avail_len < Self::ENCODED_LEN {
22856            payload_buf[0..avail_len].copy_from_slice(__input);
22857            Bytes::new(&payload_buf)
22858        } else {
22859            Bytes::new(__input)
22860        };
22861        let mut __struct = Self::default();
22862        __struct.target_system = buf.get_u8();
22863        __struct.target_component = buf.get_u8();
22864        for v in &mut __struct.param_id {
22865            let val = buf.get_u8();
22866            *v = val;
22867        }
22868        for v in &mut __struct.param_value {
22869            let val = buf.get_u8();
22870            *v = val;
22871        }
22872        let tmp = buf.get_u8();
22873        __struct.param_type =
22874            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22875                enum_type: "MavParamExtType",
22876                value: tmp as u32,
22877            })?;
22878        Ok(__struct)
22879    }
22880    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22881        let mut __tmp = BytesMut::new(bytes);
22882        #[allow(clippy::absurd_extreme_comparisons)]
22883        #[allow(unused_comparisons)]
22884        if __tmp.remaining() < Self::ENCODED_LEN {
22885            panic!(
22886                "buffer is too small (need {} bytes, but got {})",
22887                Self::ENCODED_LEN,
22888                __tmp.remaining(),
22889            )
22890        }
22891        __tmp.put_u8(self.target_system);
22892        __tmp.put_u8(self.target_component);
22893        for val in &self.param_id {
22894            __tmp.put_u8(*val);
22895        }
22896        for val in &self.param_value {
22897            __tmp.put_u8(*val);
22898        }
22899        __tmp.put_u8(self.param_type as u8);
22900        if matches!(version, MavlinkVersion::V2) {
22901            let len = __tmp.len();
22902            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22903        } else {
22904            __tmp.len()
22905        }
22906    }
22907}
22908#[doc = "id: 322"]
22909#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
22910#[derive(Debug, Clone, PartialEq)]
22911#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22913pub struct PARAM_EXT_VALUE_DATA {
22914    #[doc = "Total number of parameters"]
22915    pub param_count: u16,
22916    #[doc = "Index of this parameter"]
22917    pub param_index: u16,
22918    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22919    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22920    pub param_id: [u8; 16],
22921    #[doc = "Parameter value"]
22922    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22923    pub param_value: [u8; 128],
22924    #[doc = "Parameter type."]
22925    pub param_type: MavParamExtType,
22926}
22927impl PARAM_EXT_VALUE_DATA {
22928    pub const ENCODED_LEN: usize = 149usize;
22929    pub const DEFAULT: Self = Self {
22930        param_count: 0_u16,
22931        param_index: 0_u16,
22932        param_id: [0_u8; 16usize],
22933        param_value: [0_u8; 128usize],
22934        param_type: MavParamExtType::DEFAULT,
22935    };
22936    #[cfg(feature = "arbitrary")]
22937    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22938        use arbitrary::{Arbitrary, Unstructured};
22939        let mut buf = [0u8; 1024];
22940        rng.fill_bytes(&mut buf);
22941        let mut unstructured = Unstructured::new(&buf);
22942        Self::arbitrary(&mut unstructured).unwrap_or_default()
22943    }
22944}
22945impl Default for PARAM_EXT_VALUE_DATA {
22946    fn default() -> Self {
22947        Self::DEFAULT.clone()
22948    }
22949}
22950impl MessageData for PARAM_EXT_VALUE_DATA {
22951    type Message = MavMessage;
22952    const ID: u32 = 322u32;
22953    const NAME: &'static str = "PARAM_EXT_VALUE";
22954    const EXTRA_CRC: u8 = 243u8;
22955    const ENCODED_LEN: usize = 149usize;
22956    fn deser(
22957        _version: MavlinkVersion,
22958        __input: &[u8],
22959    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22960        let avail_len = __input.len();
22961        let mut payload_buf = [0; Self::ENCODED_LEN];
22962        let mut buf = if avail_len < Self::ENCODED_LEN {
22963            payload_buf[0..avail_len].copy_from_slice(__input);
22964            Bytes::new(&payload_buf)
22965        } else {
22966            Bytes::new(__input)
22967        };
22968        let mut __struct = Self::default();
22969        __struct.param_count = buf.get_u16_le();
22970        __struct.param_index = buf.get_u16_le();
22971        for v in &mut __struct.param_id {
22972            let val = buf.get_u8();
22973            *v = val;
22974        }
22975        for v in &mut __struct.param_value {
22976            let val = buf.get_u8();
22977            *v = val;
22978        }
22979        let tmp = buf.get_u8();
22980        __struct.param_type =
22981            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22982                enum_type: "MavParamExtType",
22983                value: tmp as u32,
22984            })?;
22985        Ok(__struct)
22986    }
22987    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22988        let mut __tmp = BytesMut::new(bytes);
22989        #[allow(clippy::absurd_extreme_comparisons)]
22990        #[allow(unused_comparisons)]
22991        if __tmp.remaining() < Self::ENCODED_LEN {
22992            panic!(
22993                "buffer is too small (need {} bytes, but got {})",
22994                Self::ENCODED_LEN,
22995                __tmp.remaining(),
22996            )
22997        }
22998        __tmp.put_u16_le(self.param_count);
22999        __tmp.put_u16_le(self.param_index);
23000        for val in &self.param_id {
23001            __tmp.put_u8(*val);
23002        }
23003        for val in &self.param_value {
23004            __tmp.put_u8(*val);
23005        }
23006        __tmp.put_u8(self.param_type as u8);
23007        if matches!(version, MavlinkVersion::V2) {
23008            let len = __tmp.len();
23009            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23010        } else {
23011            __tmp.len()
23012        }
23013    }
23014}
23015#[doc = "id: 50"]
23016#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
23017#[derive(Debug, Clone, PartialEq)]
23018#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23019#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23020pub struct PARAM_MAP_RC_DATA {
23021    #[doc = "Initial parameter value"]
23022    pub param_value0: f32,
23023    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
23024    pub scale: f32,
23025    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
23026    pub param_value_min: f32,
23027    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
23028    pub param_value_max: f32,
23029    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
23030    pub param_index: i16,
23031    #[doc = "System ID"]
23032    pub target_system: u8,
23033    #[doc = "Component ID"]
23034    pub target_component: u8,
23035    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23036    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23037    pub param_id: [u8; 16],
23038    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
23039    pub parameter_rc_channel_index: u8,
23040}
23041impl PARAM_MAP_RC_DATA {
23042    pub const ENCODED_LEN: usize = 37usize;
23043    pub const DEFAULT: Self = Self {
23044        param_value0: 0.0_f32,
23045        scale: 0.0_f32,
23046        param_value_min: 0.0_f32,
23047        param_value_max: 0.0_f32,
23048        param_index: 0_i16,
23049        target_system: 0_u8,
23050        target_component: 0_u8,
23051        param_id: [0_u8; 16usize],
23052        parameter_rc_channel_index: 0_u8,
23053    };
23054    #[cfg(feature = "arbitrary")]
23055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23056        use arbitrary::{Arbitrary, Unstructured};
23057        let mut buf = [0u8; 1024];
23058        rng.fill_bytes(&mut buf);
23059        let mut unstructured = Unstructured::new(&buf);
23060        Self::arbitrary(&mut unstructured).unwrap_or_default()
23061    }
23062}
23063impl Default for PARAM_MAP_RC_DATA {
23064    fn default() -> Self {
23065        Self::DEFAULT.clone()
23066    }
23067}
23068impl MessageData for PARAM_MAP_RC_DATA {
23069    type Message = MavMessage;
23070    const ID: u32 = 50u32;
23071    const NAME: &'static str = "PARAM_MAP_RC";
23072    const EXTRA_CRC: u8 = 78u8;
23073    const ENCODED_LEN: usize = 37usize;
23074    fn deser(
23075        _version: MavlinkVersion,
23076        __input: &[u8],
23077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23078        let avail_len = __input.len();
23079        let mut payload_buf = [0; Self::ENCODED_LEN];
23080        let mut buf = if avail_len < Self::ENCODED_LEN {
23081            payload_buf[0..avail_len].copy_from_slice(__input);
23082            Bytes::new(&payload_buf)
23083        } else {
23084            Bytes::new(__input)
23085        };
23086        let mut __struct = Self::default();
23087        __struct.param_value0 = buf.get_f32_le();
23088        __struct.scale = buf.get_f32_le();
23089        __struct.param_value_min = buf.get_f32_le();
23090        __struct.param_value_max = buf.get_f32_le();
23091        __struct.param_index = buf.get_i16_le();
23092        __struct.target_system = buf.get_u8();
23093        __struct.target_component = buf.get_u8();
23094        for v in &mut __struct.param_id {
23095            let val = buf.get_u8();
23096            *v = val;
23097        }
23098        __struct.parameter_rc_channel_index = buf.get_u8();
23099        Ok(__struct)
23100    }
23101    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23102        let mut __tmp = BytesMut::new(bytes);
23103        #[allow(clippy::absurd_extreme_comparisons)]
23104        #[allow(unused_comparisons)]
23105        if __tmp.remaining() < Self::ENCODED_LEN {
23106            panic!(
23107                "buffer is too small (need {} bytes, but got {})",
23108                Self::ENCODED_LEN,
23109                __tmp.remaining(),
23110            )
23111        }
23112        __tmp.put_f32_le(self.param_value0);
23113        __tmp.put_f32_le(self.scale);
23114        __tmp.put_f32_le(self.param_value_min);
23115        __tmp.put_f32_le(self.param_value_max);
23116        __tmp.put_i16_le(self.param_index);
23117        __tmp.put_u8(self.target_system);
23118        __tmp.put_u8(self.target_component);
23119        for val in &self.param_id {
23120            __tmp.put_u8(*val);
23121        }
23122        __tmp.put_u8(self.parameter_rc_channel_index);
23123        if matches!(version, MavlinkVersion::V2) {
23124            let len = __tmp.len();
23125            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23126        } else {
23127            __tmp.len()
23128        }
23129    }
23130}
23131#[doc = "id: 21"]
23132#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23133#[derive(Debug, Clone, PartialEq)]
23134#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23135#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23136pub struct PARAM_REQUEST_LIST_DATA {
23137    #[doc = "System ID"]
23138    pub target_system: u8,
23139    #[doc = "Component ID"]
23140    pub target_component: u8,
23141}
23142impl PARAM_REQUEST_LIST_DATA {
23143    pub const ENCODED_LEN: usize = 2usize;
23144    pub const DEFAULT: Self = Self {
23145        target_system: 0_u8,
23146        target_component: 0_u8,
23147    };
23148    #[cfg(feature = "arbitrary")]
23149    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23150        use arbitrary::{Arbitrary, Unstructured};
23151        let mut buf = [0u8; 1024];
23152        rng.fill_bytes(&mut buf);
23153        let mut unstructured = Unstructured::new(&buf);
23154        Self::arbitrary(&mut unstructured).unwrap_or_default()
23155    }
23156}
23157impl Default for PARAM_REQUEST_LIST_DATA {
23158    fn default() -> Self {
23159        Self::DEFAULT.clone()
23160    }
23161}
23162impl MessageData for PARAM_REQUEST_LIST_DATA {
23163    type Message = MavMessage;
23164    const ID: u32 = 21u32;
23165    const NAME: &'static str = "PARAM_REQUEST_LIST";
23166    const EXTRA_CRC: u8 = 159u8;
23167    const ENCODED_LEN: usize = 2usize;
23168    fn deser(
23169        _version: MavlinkVersion,
23170        __input: &[u8],
23171    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23172        let avail_len = __input.len();
23173        let mut payload_buf = [0; Self::ENCODED_LEN];
23174        let mut buf = if avail_len < Self::ENCODED_LEN {
23175            payload_buf[0..avail_len].copy_from_slice(__input);
23176            Bytes::new(&payload_buf)
23177        } else {
23178            Bytes::new(__input)
23179        };
23180        let mut __struct = Self::default();
23181        __struct.target_system = buf.get_u8();
23182        __struct.target_component = buf.get_u8();
23183        Ok(__struct)
23184    }
23185    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23186        let mut __tmp = BytesMut::new(bytes);
23187        #[allow(clippy::absurd_extreme_comparisons)]
23188        #[allow(unused_comparisons)]
23189        if __tmp.remaining() < Self::ENCODED_LEN {
23190            panic!(
23191                "buffer is too small (need {} bytes, but got {})",
23192                Self::ENCODED_LEN,
23193                __tmp.remaining(),
23194            )
23195        }
23196        __tmp.put_u8(self.target_system);
23197        __tmp.put_u8(self.target_component);
23198        if matches!(version, MavlinkVersion::V2) {
23199            let len = __tmp.len();
23200            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23201        } else {
23202            __tmp.len()
23203        }
23204    }
23205}
23206#[doc = "id: 20"]
23207#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
23208#[derive(Debug, Clone, PartialEq)]
23209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23210#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23211pub struct PARAM_REQUEST_READ_DATA {
23212    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
23213    pub param_index: i16,
23214    #[doc = "System ID"]
23215    pub target_system: u8,
23216    #[doc = "Component ID"]
23217    pub target_component: u8,
23218    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23219    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23220    pub param_id: [u8; 16],
23221}
23222impl PARAM_REQUEST_READ_DATA {
23223    pub const ENCODED_LEN: usize = 20usize;
23224    pub const DEFAULT: Self = Self {
23225        param_index: 0_i16,
23226        target_system: 0_u8,
23227        target_component: 0_u8,
23228        param_id: [0_u8; 16usize],
23229    };
23230    #[cfg(feature = "arbitrary")]
23231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23232        use arbitrary::{Arbitrary, Unstructured};
23233        let mut buf = [0u8; 1024];
23234        rng.fill_bytes(&mut buf);
23235        let mut unstructured = Unstructured::new(&buf);
23236        Self::arbitrary(&mut unstructured).unwrap_or_default()
23237    }
23238}
23239impl Default for PARAM_REQUEST_READ_DATA {
23240    fn default() -> Self {
23241        Self::DEFAULT.clone()
23242    }
23243}
23244impl MessageData for PARAM_REQUEST_READ_DATA {
23245    type Message = MavMessage;
23246    const ID: u32 = 20u32;
23247    const NAME: &'static str = "PARAM_REQUEST_READ";
23248    const EXTRA_CRC: u8 = 214u8;
23249    const ENCODED_LEN: usize = 20usize;
23250    fn deser(
23251        _version: MavlinkVersion,
23252        __input: &[u8],
23253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23254        let avail_len = __input.len();
23255        let mut payload_buf = [0; Self::ENCODED_LEN];
23256        let mut buf = if avail_len < Self::ENCODED_LEN {
23257            payload_buf[0..avail_len].copy_from_slice(__input);
23258            Bytes::new(&payload_buf)
23259        } else {
23260            Bytes::new(__input)
23261        };
23262        let mut __struct = Self::default();
23263        __struct.param_index = buf.get_i16_le();
23264        __struct.target_system = buf.get_u8();
23265        __struct.target_component = buf.get_u8();
23266        for v in &mut __struct.param_id {
23267            let val = buf.get_u8();
23268            *v = val;
23269        }
23270        Ok(__struct)
23271    }
23272    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23273        let mut __tmp = BytesMut::new(bytes);
23274        #[allow(clippy::absurd_extreme_comparisons)]
23275        #[allow(unused_comparisons)]
23276        if __tmp.remaining() < Self::ENCODED_LEN {
23277            panic!(
23278                "buffer is too small (need {} bytes, but got {})",
23279                Self::ENCODED_LEN,
23280                __tmp.remaining(),
23281            )
23282        }
23283        __tmp.put_i16_le(self.param_index);
23284        __tmp.put_u8(self.target_system);
23285        __tmp.put_u8(self.target_component);
23286        for val in &self.param_id {
23287            __tmp.put_u8(*val);
23288        }
23289        if matches!(version, MavlinkVersion::V2) {
23290            let len = __tmp.len();
23291            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23292        } else {
23293            __tmp.len()
23294        }
23295    }
23296}
23297#[doc = "id: 23"]
23298#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23299#[derive(Debug, Clone, PartialEq)]
23300#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23301#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23302pub struct PARAM_SET_DATA {
23303    #[doc = "Onboard parameter value"]
23304    pub param_value: f32,
23305    #[doc = "System ID"]
23306    pub target_system: u8,
23307    #[doc = "Component ID"]
23308    pub target_component: u8,
23309    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23310    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23311    pub param_id: [u8; 16],
23312    #[doc = "Onboard parameter type."]
23313    pub param_type: MavParamType,
23314}
23315impl PARAM_SET_DATA {
23316    pub const ENCODED_LEN: usize = 23usize;
23317    pub const DEFAULT: Self = Self {
23318        param_value: 0.0_f32,
23319        target_system: 0_u8,
23320        target_component: 0_u8,
23321        param_id: [0_u8; 16usize],
23322        param_type: MavParamType::DEFAULT,
23323    };
23324    #[cfg(feature = "arbitrary")]
23325    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23326        use arbitrary::{Arbitrary, Unstructured};
23327        let mut buf = [0u8; 1024];
23328        rng.fill_bytes(&mut buf);
23329        let mut unstructured = Unstructured::new(&buf);
23330        Self::arbitrary(&mut unstructured).unwrap_or_default()
23331    }
23332}
23333impl Default for PARAM_SET_DATA {
23334    fn default() -> Self {
23335        Self::DEFAULT.clone()
23336    }
23337}
23338impl MessageData for PARAM_SET_DATA {
23339    type Message = MavMessage;
23340    const ID: u32 = 23u32;
23341    const NAME: &'static str = "PARAM_SET";
23342    const EXTRA_CRC: u8 = 168u8;
23343    const ENCODED_LEN: usize = 23usize;
23344    fn deser(
23345        _version: MavlinkVersion,
23346        __input: &[u8],
23347    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23348        let avail_len = __input.len();
23349        let mut payload_buf = [0; Self::ENCODED_LEN];
23350        let mut buf = if avail_len < Self::ENCODED_LEN {
23351            payload_buf[0..avail_len].copy_from_slice(__input);
23352            Bytes::new(&payload_buf)
23353        } else {
23354            Bytes::new(__input)
23355        };
23356        let mut __struct = Self::default();
23357        __struct.param_value = buf.get_f32_le();
23358        __struct.target_system = buf.get_u8();
23359        __struct.target_component = buf.get_u8();
23360        for v in &mut __struct.param_id {
23361            let val = buf.get_u8();
23362            *v = val;
23363        }
23364        let tmp = buf.get_u8();
23365        __struct.param_type =
23366            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23367                enum_type: "MavParamType",
23368                value: tmp as u32,
23369            })?;
23370        Ok(__struct)
23371    }
23372    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23373        let mut __tmp = BytesMut::new(bytes);
23374        #[allow(clippy::absurd_extreme_comparisons)]
23375        #[allow(unused_comparisons)]
23376        if __tmp.remaining() < Self::ENCODED_LEN {
23377            panic!(
23378                "buffer is too small (need {} bytes, but got {})",
23379                Self::ENCODED_LEN,
23380                __tmp.remaining(),
23381            )
23382        }
23383        __tmp.put_f32_le(self.param_value);
23384        __tmp.put_u8(self.target_system);
23385        __tmp.put_u8(self.target_component);
23386        for val in &self.param_id {
23387            __tmp.put_u8(*val);
23388        }
23389        __tmp.put_u8(self.param_type as u8);
23390        if matches!(version, MavlinkVersion::V2) {
23391            let len = __tmp.len();
23392            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23393        } else {
23394            __tmp.len()
23395        }
23396    }
23397}
23398#[doc = "id: 22"]
23399#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23400#[derive(Debug, Clone, PartialEq)]
23401#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23402#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23403pub struct PARAM_VALUE_DATA {
23404    #[doc = "Onboard parameter value"]
23405    pub param_value: f32,
23406    #[doc = "Total number of onboard parameters"]
23407    pub param_count: u16,
23408    #[doc = "Index of this onboard parameter"]
23409    pub param_index: u16,
23410    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23411    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23412    pub param_id: [u8; 16],
23413    #[doc = "Onboard parameter type."]
23414    pub param_type: MavParamType,
23415}
23416impl PARAM_VALUE_DATA {
23417    pub const ENCODED_LEN: usize = 25usize;
23418    pub const DEFAULT: Self = Self {
23419        param_value: 0.0_f32,
23420        param_count: 0_u16,
23421        param_index: 0_u16,
23422        param_id: [0_u8; 16usize],
23423        param_type: MavParamType::DEFAULT,
23424    };
23425    #[cfg(feature = "arbitrary")]
23426    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23427        use arbitrary::{Arbitrary, Unstructured};
23428        let mut buf = [0u8; 1024];
23429        rng.fill_bytes(&mut buf);
23430        let mut unstructured = Unstructured::new(&buf);
23431        Self::arbitrary(&mut unstructured).unwrap_or_default()
23432    }
23433}
23434impl Default for PARAM_VALUE_DATA {
23435    fn default() -> Self {
23436        Self::DEFAULT.clone()
23437    }
23438}
23439impl MessageData for PARAM_VALUE_DATA {
23440    type Message = MavMessage;
23441    const ID: u32 = 22u32;
23442    const NAME: &'static str = "PARAM_VALUE";
23443    const EXTRA_CRC: u8 = 220u8;
23444    const ENCODED_LEN: usize = 25usize;
23445    fn deser(
23446        _version: MavlinkVersion,
23447        __input: &[u8],
23448    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23449        let avail_len = __input.len();
23450        let mut payload_buf = [0; Self::ENCODED_LEN];
23451        let mut buf = if avail_len < Self::ENCODED_LEN {
23452            payload_buf[0..avail_len].copy_from_slice(__input);
23453            Bytes::new(&payload_buf)
23454        } else {
23455            Bytes::new(__input)
23456        };
23457        let mut __struct = Self::default();
23458        __struct.param_value = buf.get_f32_le();
23459        __struct.param_count = buf.get_u16_le();
23460        __struct.param_index = buf.get_u16_le();
23461        for v in &mut __struct.param_id {
23462            let val = buf.get_u8();
23463            *v = val;
23464        }
23465        let tmp = buf.get_u8();
23466        __struct.param_type =
23467            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23468                enum_type: "MavParamType",
23469                value: tmp as u32,
23470            })?;
23471        Ok(__struct)
23472    }
23473    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23474        let mut __tmp = BytesMut::new(bytes);
23475        #[allow(clippy::absurd_extreme_comparisons)]
23476        #[allow(unused_comparisons)]
23477        if __tmp.remaining() < Self::ENCODED_LEN {
23478            panic!(
23479                "buffer is too small (need {} bytes, but got {})",
23480                Self::ENCODED_LEN,
23481                __tmp.remaining(),
23482            )
23483        }
23484        __tmp.put_f32_le(self.param_value);
23485        __tmp.put_u16_le(self.param_count);
23486        __tmp.put_u16_le(self.param_index);
23487        for val in &self.param_id {
23488            __tmp.put_u8(*val);
23489        }
23490        __tmp.put_u8(self.param_type as u8);
23491        if matches!(version, MavlinkVersion::V2) {
23492            let len = __tmp.len();
23493            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23494        } else {
23495            __tmp.len()
23496        }
23497    }
23498}
23499#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23500#[doc = "id: 4"]
23501#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23502#[derive(Debug, Clone, PartialEq)]
23503#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23504#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23505pub struct PING_DATA {
23506    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23507    pub time_usec: u64,
23508    #[doc = "PING sequence"]
23509    pub seq: u32,
23510    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23511    pub target_system: u8,
23512    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23513    pub target_component: u8,
23514}
23515impl PING_DATA {
23516    pub const ENCODED_LEN: usize = 14usize;
23517    pub const DEFAULT: Self = Self {
23518        time_usec: 0_u64,
23519        seq: 0_u32,
23520        target_system: 0_u8,
23521        target_component: 0_u8,
23522    };
23523    #[cfg(feature = "arbitrary")]
23524    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23525        use arbitrary::{Arbitrary, Unstructured};
23526        let mut buf = [0u8; 1024];
23527        rng.fill_bytes(&mut buf);
23528        let mut unstructured = Unstructured::new(&buf);
23529        Self::arbitrary(&mut unstructured).unwrap_or_default()
23530    }
23531}
23532impl Default for PING_DATA {
23533    fn default() -> Self {
23534        Self::DEFAULT.clone()
23535    }
23536}
23537impl MessageData for PING_DATA {
23538    type Message = MavMessage;
23539    const ID: u32 = 4u32;
23540    const NAME: &'static str = "PING";
23541    const EXTRA_CRC: u8 = 237u8;
23542    const ENCODED_LEN: usize = 14usize;
23543    fn deser(
23544        _version: MavlinkVersion,
23545        __input: &[u8],
23546    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23547        let avail_len = __input.len();
23548        let mut payload_buf = [0; Self::ENCODED_LEN];
23549        let mut buf = if avail_len < Self::ENCODED_LEN {
23550            payload_buf[0..avail_len].copy_from_slice(__input);
23551            Bytes::new(&payload_buf)
23552        } else {
23553            Bytes::new(__input)
23554        };
23555        let mut __struct = Self::default();
23556        __struct.time_usec = buf.get_u64_le();
23557        __struct.seq = buf.get_u32_le();
23558        __struct.target_system = buf.get_u8();
23559        __struct.target_component = buf.get_u8();
23560        Ok(__struct)
23561    }
23562    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23563        let mut __tmp = BytesMut::new(bytes);
23564        #[allow(clippy::absurd_extreme_comparisons)]
23565        #[allow(unused_comparisons)]
23566        if __tmp.remaining() < Self::ENCODED_LEN {
23567            panic!(
23568                "buffer is too small (need {} bytes, but got {})",
23569                Self::ENCODED_LEN,
23570                __tmp.remaining(),
23571            )
23572        }
23573        __tmp.put_u64_le(self.time_usec);
23574        __tmp.put_u32_le(self.seq);
23575        __tmp.put_u8(self.target_system);
23576        __tmp.put_u8(self.target_component);
23577        if matches!(version, MavlinkVersion::V2) {
23578            let len = __tmp.len();
23579            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23580        } else {
23581            __tmp.len()
23582        }
23583    }
23584}
23585#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
23586#[doc = "id: 258"]
23587#[doc = "Control vehicle tone generation (buzzer)."]
23588#[derive(Debug, Clone, PartialEq)]
23589#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23590#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23591pub struct PLAY_TUNE_DATA {
23592    #[doc = "System ID"]
23593    pub target_system: u8,
23594    #[doc = "Component ID"]
23595    pub target_component: u8,
23596    #[doc = "tune in board specific format"]
23597    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23598    pub tune: [u8; 30],
23599    #[doc = "tune extension (appended to tune)"]
23600    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23601    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23602    pub tune2: [u8; 200],
23603}
23604impl PLAY_TUNE_DATA {
23605    pub const ENCODED_LEN: usize = 232usize;
23606    pub const DEFAULT: Self = Self {
23607        target_system: 0_u8,
23608        target_component: 0_u8,
23609        tune: [0_u8; 30usize],
23610        tune2: [0_u8; 200usize],
23611    };
23612    #[cfg(feature = "arbitrary")]
23613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23614        use arbitrary::{Arbitrary, Unstructured};
23615        let mut buf = [0u8; 1024];
23616        rng.fill_bytes(&mut buf);
23617        let mut unstructured = Unstructured::new(&buf);
23618        Self::arbitrary(&mut unstructured).unwrap_or_default()
23619    }
23620}
23621impl Default for PLAY_TUNE_DATA {
23622    fn default() -> Self {
23623        Self::DEFAULT.clone()
23624    }
23625}
23626impl MessageData for PLAY_TUNE_DATA {
23627    type Message = MavMessage;
23628    const ID: u32 = 258u32;
23629    const NAME: &'static str = "PLAY_TUNE";
23630    const EXTRA_CRC: u8 = 187u8;
23631    const ENCODED_LEN: usize = 232usize;
23632    fn deser(
23633        _version: MavlinkVersion,
23634        __input: &[u8],
23635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23636        let avail_len = __input.len();
23637        let mut payload_buf = [0; Self::ENCODED_LEN];
23638        let mut buf = if avail_len < Self::ENCODED_LEN {
23639            payload_buf[0..avail_len].copy_from_slice(__input);
23640            Bytes::new(&payload_buf)
23641        } else {
23642            Bytes::new(__input)
23643        };
23644        let mut __struct = Self::default();
23645        __struct.target_system = buf.get_u8();
23646        __struct.target_component = buf.get_u8();
23647        for v in &mut __struct.tune {
23648            let val = buf.get_u8();
23649            *v = val;
23650        }
23651        for v in &mut __struct.tune2 {
23652            let val = buf.get_u8();
23653            *v = val;
23654        }
23655        Ok(__struct)
23656    }
23657    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23658        let mut __tmp = BytesMut::new(bytes);
23659        #[allow(clippy::absurd_extreme_comparisons)]
23660        #[allow(unused_comparisons)]
23661        if __tmp.remaining() < Self::ENCODED_LEN {
23662            panic!(
23663                "buffer is too small (need {} bytes, but got {})",
23664                Self::ENCODED_LEN,
23665                __tmp.remaining(),
23666            )
23667        }
23668        __tmp.put_u8(self.target_system);
23669        __tmp.put_u8(self.target_component);
23670        for val in &self.tune {
23671            __tmp.put_u8(*val);
23672        }
23673        for val in &self.tune2 {
23674            __tmp.put_u8(*val);
23675        }
23676        if matches!(version, MavlinkVersion::V2) {
23677            let len = __tmp.len();
23678            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23679        } else {
23680            __tmp.len()
23681        }
23682    }
23683}
23684#[doc = "id: 400"]
23685#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
23686#[derive(Debug, Clone, PartialEq)]
23687#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23688#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23689pub struct PLAY_TUNE_V2_DATA {
23690    #[doc = "Tune format"]
23691    pub format: TuneFormat,
23692    #[doc = "System ID"]
23693    pub target_system: u8,
23694    #[doc = "Component ID"]
23695    pub target_component: u8,
23696    #[doc = "Tune definition as a NULL-terminated string."]
23697    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23698    pub tune: [u8; 248],
23699}
23700impl PLAY_TUNE_V2_DATA {
23701    pub const ENCODED_LEN: usize = 254usize;
23702    pub const DEFAULT: Self = Self {
23703        format: TuneFormat::DEFAULT,
23704        target_system: 0_u8,
23705        target_component: 0_u8,
23706        tune: [0_u8; 248usize],
23707    };
23708    #[cfg(feature = "arbitrary")]
23709    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23710        use arbitrary::{Arbitrary, Unstructured};
23711        let mut buf = [0u8; 1024];
23712        rng.fill_bytes(&mut buf);
23713        let mut unstructured = Unstructured::new(&buf);
23714        Self::arbitrary(&mut unstructured).unwrap_or_default()
23715    }
23716}
23717impl Default for PLAY_TUNE_V2_DATA {
23718    fn default() -> Self {
23719        Self::DEFAULT.clone()
23720    }
23721}
23722impl MessageData for PLAY_TUNE_V2_DATA {
23723    type Message = MavMessage;
23724    const ID: u32 = 400u32;
23725    const NAME: &'static str = "PLAY_TUNE_V2";
23726    const EXTRA_CRC: u8 = 110u8;
23727    const ENCODED_LEN: usize = 254usize;
23728    fn deser(
23729        _version: MavlinkVersion,
23730        __input: &[u8],
23731    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23732        let avail_len = __input.len();
23733        let mut payload_buf = [0; Self::ENCODED_LEN];
23734        let mut buf = if avail_len < Self::ENCODED_LEN {
23735            payload_buf[0..avail_len].copy_from_slice(__input);
23736            Bytes::new(&payload_buf)
23737        } else {
23738            Bytes::new(__input)
23739        };
23740        let mut __struct = Self::default();
23741        let tmp = buf.get_u32_le();
23742        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
23743            ::mavlink_core::error::ParserError::InvalidEnum {
23744                enum_type: "TuneFormat",
23745                value: tmp as u32,
23746            },
23747        )?;
23748        __struct.target_system = buf.get_u8();
23749        __struct.target_component = buf.get_u8();
23750        for v in &mut __struct.tune {
23751            let val = buf.get_u8();
23752            *v = val;
23753        }
23754        Ok(__struct)
23755    }
23756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23757        let mut __tmp = BytesMut::new(bytes);
23758        #[allow(clippy::absurd_extreme_comparisons)]
23759        #[allow(unused_comparisons)]
23760        if __tmp.remaining() < Self::ENCODED_LEN {
23761            panic!(
23762                "buffer is too small (need {} bytes, but got {})",
23763                Self::ENCODED_LEN,
23764                __tmp.remaining(),
23765            )
23766        }
23767        __tmp.put_u32_le(self.format as u32);
23768        __tmp.put_u8(self.target_system);
23769        __tmp.put_u8(self.target_component);
23770        for val in &self.tune {
23771            __tmp.put_u8(*val);
23772        }
23773        if matches!(version, MavlinkVersion::V2) {
23774            let len = __tmp.len();
23775            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23776        } else {
23777            __tmp.len()
23778        }
23779    }
23780}
23781#[doc = "id: 87"]
23782#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
23783#[derive(Debug, Clone, PartialEq)]
23784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23785#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23786pub struct POSITION_TARGET_GLOBAL_INT_DATA {
23787    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
23788    pub time_boot_ms: u32,
23789    #[doc = "Latitude in WGS84 frame"]
23790    pub lat_int: i32,
23791    #[doc = "Longitude in WGS84 frame"]
23792    pub lon_int: i32,
23793    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
23794    pub alt: f32,
23795    #[doc = "X velocity in NED frame"]
23796    pub vx: f32,
23797    #[doc = "Y velocity in NED frame"]
23798    pub vy: f32,
23799    #[doc = "Z velocity in NED frame"]
23800    pub vz: f32,
23801    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23802    pub afx: f32,
23803    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23804    pub afy: f32,
23805    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23806    pub afz: f32,
23807    #[doc = "yaw setpoint"]
23808    pub yaw: f32,
23809    #[doc = "yaw rate setpoint"]
23810    pub yaw_rate: f32,
23811    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23812    pub type_mask: PositionTargetTypemask,
23813    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
23814    pub coordinate_frame: MavFrame,
23815}
23816impl POSITION_TARGET_GLOBAL_INT_DATA {
23817    pub const ENCODED_LEN: usize = 51usize;
23818    pub const DEFAULT: Self = Self {
23819        time_boot_ms: 0_u32,
23820        lat_int: 0_i32,
23821        lon_int: 0_i32,
23822        alt: 0.0_f32,
23823        vx: 0.0_f32,
23824        vy: 0.0_f32,
23825        vz: 0.0_f32,
23826        afx: 0.0_f32,
23827        afy: 0.0_f32,
23828        afz: 0.0_f32,
23829        yaw: 0.0_f32,
23830        yaw_rate: 0.0_f32,
23831        type_mask: PositionTargetTypemask::DEFAULT,
23832        coordinate_frame: MavFrame::DEFAULT,
23833    };
23834    #[cfg(feature = "arbitrary")]
23835    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23836        use arbitrary::{Arbitrary, Unstructured};
23837        let mut buf = [0u8; 1024];
23838        rng.fill_bytes(&mut buf);
23839        let mut unstructured = Unstructured::new(&buf);
23840        Self::arbitrary(&mut unstructured).unwrap_or_default()
23841    }
23842}
23843impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
23844    fn default() -> Self {
23845        Self::DEFAULT.clone()
23846    }
23847}
23848impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
23849    type Message = MavMessage;
23850    const ID: u32 = 87u32;
23851    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
23852    const EXTRA_CRC: u8 = 150u8;
23853    const ENCODED_LEN: usize = 51usize;
23854    fn deser(
23855        _version: MavlinkVersion,
23856        __input: &[u8],
23857    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23858        let avail_len = __input.len();
23859        let mut payload_buf = [0; Self::ENCODED_LEN];
23860        let mut buf = if avail_len < Self::ENCODED_LEN {
23861            payload_buf[0..avail_len].copy_from_slice(__input);
23862            Bytes::new(&payload_buf)
23863        } else {
23864            Bytes::new(__input)
23865        };
23866        let mut __struct = Self::default();
23867        __struct.time_boot_ms = buf.get_u32_le();
23868        __struct.lat_int = buf.get_i32_le();
23869        __struct.lon_int = buf.get_i32_le();
23870        __struct.alt = buf.get_f32_le();
23871        __struct.vx = buf.get_f32_le();
23872        __struct.vy = buf.get_f32_le();
23873        __struct.vz = buf.get_f32_le();
23874        __struct.afx = buf.get_f32_le();
23875        __struct.afy = buf.get_f32_le();
23876        __struct.afz = buf.get_f32_le();
23877        __struct.yaw = buf.get_f32_le();
23878        __struct.yaw_rate = buf.get_f32_le();
23879        let tmp = buf.get_u16_le();
23880        __struct.type_mask = PositionTargetTypemask::from_bits(
23881            tmp & PositionTargetTypemask::all().bits(),
23882        )
23883        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23884            flag_type: "PositionTargetTypemask",
23885            value: tmp as u32,
23886        })?;
23887        let tmp = buf.get_u8();
23888        __struct.coordinate_frame =
23889            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23890                enum_type: "MavFrame",
23891                value: tmp as u32,
23892            })?;
23893        Ok(__struct)
23894    }
23895    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23896        let mut __tmp = BytesMut::new(bytes);
23897        #[allow(clippy::absurd_extreme_comparisons)]
23898        #[allow(unused_comparisons)]
23899        if __tmp.remaining() < Self::ENCODED_LEN {
23900            panic!(
23901                "buffer is too small (need {} bytes, but got {})",
23902                Self::ENCODED_LEN,
23903                __tmp.remaining(),
23904            )
23905        }
23906        __tmp.put_u32_le(self.time_boot_ms);
23907        __tmp.put_i32_le(self.lat_int);
23908        __tmp.put_i32_le(self.lon_int);
23909        __tmp.put_f32_le(self.alt);
23910        __tmp.put_f32_le(self.vx);
23911        __tmp.put_f32_le(self.vy);
23912        __tmp.put_f32_le(self.vz);
23913        __tmp.put_f32_le(self.afx);
23914        __tmp.put_f32_le(self.afy);
23915        __tmp.put_f32_le(self.afz);
23916        __tmp.put_f32_le(self.yaw);
23917        __tmp.put_f32_le(self.yaw_rate);
23918        __tmp.put_u16_le(self.type_mask.bits());
23919        __tmp.put_u8(self.coordinate_frame as u8);
23920        if matches!(version, MavlinkVersion::V2) {
23921            let len = __tmp.len();
23922            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23923        } else {
23924            __tmp.len()
23925        }
23926    }
23927}
23928#[doc = "id: 85"]
23929#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
23930#[derive(Debug, Clone, PartialEq)]
23931#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23933pub struct POSITION_TARGET_LOCAL_NED_DATA {
23934    #[doc = "Timestamp (time since system boot)."]
23935    pub time_boot_ms: u32,
23936    #[doc = "X Position in NED frame"]
23937    pub x: f32,
23938    #[doc = "Y Position in NED frame"]
23939    pub y: f32,
23940    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
23941    pub z: f32,
23942    #[doc = "X velocity in NED frame"]
23943    pub vx: f32,
23944    #[doc = "Y velocity in NED frame"]
23945    pub vy: f32,
23946    #[doc = "Z velocity in NED frame"]
23947    pub vz: f32,
23948    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23949    pub afx: f32,
23950    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23951    pub afy: f32,
23952    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23953    pub afz: f32,
23954    #[doc = "yaw setpoint"]
23955    pub yaw: f32,
23956    #[doc = "yaw rate setpoint"]
23957    pub yaw_rate: f32,
23958    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23959    pub type_mask: PositionTargetTypemask,
23960    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
23961    pub coordinate_frame: MavFrame,
23962}
23963impl POSITION_TARGET_LOCAL_NED_DATA {
23964    pub const ENCODED_LEN: usize = 51usize;
23965    pub const DEFAULT: Self = Self {
23966        time_boot_ms: 0_u32,
23967        x: 0.0_f32,
23968        y: 0.0_f32,
23969        z: 0.0_f32,
23970        vx: 0.0_f32,
23971        vy: 0.0_f32,
23972        vz: 0.0_f32,
23973        afx: 0.0_f32,
23974        afy: 0.0_f32,
23975        afz: 0.0_f32,
23976        yaw: 0.0_f32,
23977        yaw_rate: 0.0_f32,
23978        type_mask: PositionTargetTypemask::DEFAULT,
23979        coordinate_frame: MavFrame::DEFAULT,
23980    };
23981    #[cfg(feature = "arbitrary")]
23982    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23983        use arbitrary::{Arbitrary, Unstructured};
23984        let mut buf = [0u8; 1024];
23985        rng.fill_bytes(&mut buf);
23986        let mut unstructured = Unstructured::new(&buf);
23987        Self::arbitrary(&mut unstructured).unwrap_or_default()
23988    }
23989}
23990impl Default for POSITION_TARGET_LOCAL_NED_DATA {
23991    fn default() -> Self {
23992        Self::DEFAULT.clone()
23993    }
23994}
23995impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
23996    type Message = MavMessage;
23997    const ID: u32 = 85u32;
23998    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
23999    const EXTRA_CRC: u8 = 140u8;
24000    const ENCODED_LEN: usize = 51usize;
24001    fn deser(
24002        _version: MavlinkVersion,
24003        __input: &[u8],
24004    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24005        let avail_len = __input.len();
24006        let mut payload_buf = [0; Self::ENCODED_LEN];
24007        let mut buf = if avail_len < Self::ENCODED_LEN {
24008            payload_buf[0..avail_len].copy_from_slice(__input);
24009            Bytes::new(&payload_buf)
24010        } else {
24011            Bytes::new(__input)
24012        };
24013        let mut __struct = Self::default();
24014        __struct.time_boot_ms = buf.get_u32_le();
24015        __struct.x = buf.get_f32_le();
24016        __struct.y = buf.get_f32_le();
24017        __struct.z = buf.get_f32_le();
24018        __struct.vx = buf.get_f32_le();
24019        __struct.vy = buf.get_f32_le();
24020        __struct.vz = buf.get_f32_le();
24021        __struct.afx = buf.get_f32_le();
24022        __struct.afy = buf.get_f32_le();
24023        __struct.afz = buf.get_f32_le();
24024        __struct.yaw = buf.get_f32_le();
24025        __struct.yaw_rate = buf.get_f32_le();
24026        let tmp = buf.get_u16_le();
24027        __struct.type_mask = PositionTargetTypemask::from_bits(
24028            tmp & PositionTargetTypemask::all().bits(),
24029        )
24030        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
24031            flag_type: "PositionTargetTypemask",
24032            value: tmp as u32,
24033        })?;
24034        let tmp = buf.get_u8();
24035        __struct.coordinate_frame =
24036            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
24037                enum_type: "MavFrame",
24038                value: tmp as u32,
24039            })?;
24040        Ok(__struct)
24041    }
24042    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24043        let mut __tmp = BytesMut::new(bytes);
24044        #[allow(clippy::absurd_extreme_comparisons)]
24045        #[allow(unused_comparisons)]
24046        if __tmp.remaining() < Self::ENCODED_LEN {
24047            panic!(
24048                "buffer is too small (need {} bytes, but got {})",
24049                Self::ENCODED_LEN,
24050                __tmp.remaining(),
24051            )
24052        }
24053        __tmp.put_u32_le(self.time_boot_ms);
24054        __tmp.put_f32_le(self.x);
24055        __tmp.put_f32_le(self.y);
24056        __tmp.put_f32_le(self.z);
24057        __tmp.put_f32_le(self.vx);
24058        __tmp.put_f32_le(self.vy);
24059        __tmp.put_f32_le(self.vz);
24060        __tmp.put_f32_le(self.afx);
24061        __tmp.put_f32_le(self.afy);
24062        __tmp.put_f32_le(self.afz);
24063        __tmp.put_f32_le(self.yaw);
24064        __tmp.put_f32_le(self.yaw_rate);
24065        __tmp.put_u16_le(self.type_mask.bits());
24066        __tmp.put_u8(self.coordinate_frame as u8);
24067        if matches!(version, MavlinkVersion::V2) {
24068            let len = __tmp.len();
24069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24070        } else {
24071            __tmp.len()
24072        }
24073    }
24074}
24075#[doc = "id: 125"]
24076#[doc = "Power supply status."]
24077#[derive(Debug, Clone, PartialEq)]
24078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24080pub struct POWER_STATUS_DATA {
24081    #[doc = "5V rail voltage."]
24082    pub Vcc: u16,
24083    #[doc = "Servo rail voltage."]
24084    pub Vservo: u16,
24085    #[doc = "Bitmap of power supply status flags."]
24086    pub flags: MavPowerStatus,
24087}
24088impl POWER_STATUS_DATA {
24089    pub const ENCODED_LEN: usize = 6usize;
24090    pub const DEFAULT: Self = Self {
24091        Vcc: 0_u16,
24092        Vservo: 0_u16,
24093        flags: MavPowerStatus::DEFAULT,
24094    };
24095    #[cfg(feature = "arbitrary")]
24096    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24097        use arbitrary::{Arbitrary, Unstructured};
24098        let mut buf = [0u8; 1024];
24099        rng.fill_bytes(&mut buf);
24100        let mut unstructured = Unstructured::new(&buf);
24101        Self::arbitrary(&mut unstructured).unwrap_or_default()
24102    }
24103}
24104impl Default for POWER_STATUS_DATA {
24105    fn default() -> Self {
24106        Self::DEFAULT.clone()
24107    }
24108}
24109impl MessageData for POWER_STATUS_DATA {
24110    type Message = MavMessage;
24111    const ID: u32 = 125u32;
24112    const NAME: &'static str = "POWER_STATUS";
24113    const EXTRA_CRC: u8 = 203u8;
24114    const ENCODED_LEN: usize = 6usize;
24115    fn deser(
24116        _version: MavlinkVersion,
24117        __input: &[u8],
24118    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24119        let avail_len = __input.len();
24120        let mut payload_buf = [0; Self::ENCODED_LEN];
24121        let mut buf = if avail_len < Self::ENCODED_LEN {
24122            payload_buf[0..avail_len].copy_from_slice(__input);
24123            Bytes::new(&payload_buf)
24124        } else {
24125            Bytes::new(__input)
24126        };
24127        let mut __struct = Self::default();
24128        __struct.Vcc = buf.get_u16_le();
24129        __struct.Vservo = buf.get_u16_le();
24130        let tmp = buf.get_u16_le();
24131        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
24132            ::mavlink_core::error::ParserError::InvalidFlag {
24133                flag_type: "MavPowerStatus",
24134                value: tmp as u32,
24135            },
24136        )?;
24137        Ok(__struct)
24138    }
24139    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24140        let mut __tmp = BytesMut::new(bytes);
24141        #[allow(clippy::absurd_extreme_comparisons)]
24142        #[allow(unused_comparisons)]
24143        if __tmp.remaining() < Self::ENCODED_LEN {
24144            panic!(
24145                "buffer is too small (need {} bytes, but got {})",
24146                Self::ENCODED_LEN,
24147                __tmp.remaining(),
24148            )
24149        }
24150        __tmp.put_u16_le(self.Vcc);
24151        __tmp.put_u16_le(self.Vservo);
24152        __tmp.put_u16_le(self.flags.bits());
24153        if matches!(version, MavlinkVersion::V2) {
24154            let len = __tmp.len();
24155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24156        } else {
24157            __tmp.len()
24158        }
24159    }
24160}
24161#[doc = "id: 300"]
24162#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
24163#[derive(Debug, Clone, PartialEq)]
24164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24166pub struct PROTOCOL_VERSION_DATA {
24167    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
24168    pub version: u16,
24169    #[doc = "Minimum MAVLink version supported"]
24170    pub min_version: u16,
24171    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
24172    pub max_version: u16,
24173    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24174    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24175    pub spec_version_hash: [u8; 8],
24176    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
24177    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24178    pub library_version_hash: [u8; 8],
24179}
24180impl PROTOCOL_VERSION_DATA {
24181    pub const ENCODED_LEN: usize = 22usize;
24182    pub const DEFAULT: Self = Self {
24183        version: 0_u16,
24184        min_version: 0_u16,
24185        max_version: 0_u16,
24186        spec_version_hash: [0_u8; 8usize],
24187        library_version_hash: [0_u8; 8usize],
24188    };
24189    #[cfg(feature = "arbitrary")]
24190    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24191        use arbitrary::{Arbitrary, Unstructured};
24192        let mut buf = [0u8; 1024];
24193        rng.fill_bytes(&mut buf);
24194        let mut unstructured = Unstructured::new(&buf);
24195        Self::arbitrary(&mut unstructured).unwrap_or_default()
24196    }
24197}
24198impl Default for PROTOCOL_VERSION_DATA {
24199    fn default() -> Self {
24200        Self::DEFAULT.clone()
24201    }
24202}
24203impl MessageData for PROTOCOL_VERSION_DATA {
24204    type Message = MavMessage;
24205    const ID: u32 = 300u32;
24206    const NAME: &'static str = "PROTOCOL_VERSION";
24207    const EXTRA_CRC: u8 = 217u8;
24208    const ENCODED_LEN: usize = 22usize;
24209    fn deser(
24210        _version: MavlinkVersion,
24211        __input: &[u8],
24212    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24213        let avail_len = __input.len();
24214        let mut payload_buf = [0; Self::ENCODED_LEN];
24215        let mut buf = if avail_len < Self::ENCODED_LEN {
24216            payload_buf[0..avail_len].copy_from_slice(__input);
24217            Bytes::new(&payload_buf)
24218        } else {
24219            Bytes::new(__input)
24220        };
24221        let mut __struct = Self::default();
24222        __struct.version = buf.get_u16_le();
24223        __struct.min_version = buf.get_u16_le();
24224        __struct.max_version = buf.get_u16_le();
24225        for v in &mut __struct.spec_version_hash {
24226            let val = buf.get_u8();
24227            *v = val;
24228        }
24229        for v in &mut __struct.library_version_hash {
24230            let val = buf.get_u8();
24231            *v = val;
24232        }
24233        Ok(__struct)
24234    }
24235    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24236        let mut __tmp = BytesMut::new(bytes);
24237        #[allow(clippy::absurd_extreme_comparisons)]
24238        #[allow(unused_comparisons)]
24239        if __tmp.remaining() < Self::ENCODED_LEN {
24240            panic!(
24241                "buffer is too small (need {} bytes, but got {})",
24242                Self::ENCODED_LEN,
24243                __tmp.remaining(),
24244            )
24245        }
24246        __tmp.put_u16_le(self.version);
24247        __tmp.put_u16_le(self.min_version);
24248        __tmp.put_u16_le(self.max_version);
24249        for val in &self.spec_version_hash {
24250            __tmp.put_u8(*val);
24251        }
24252        for val in &self.library_version_hash {
24253            __tmp.put_u8(*val);
24254        }
24255        if matches!(version, MavlinkVersion::V2) {
24256            let len = __tmp.len();
24257            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24258        } else {
24259            __tmp.len()
24260        }
24261    }
24262}
24263#[doc = "id: 109"]
24264#[doc = "Status generated by radio and injected into MAVLink stream."]
24265#[derive(Debug, Clone, PartialEq)]
24266#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24267#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24268pub struct RADIO_STATUS_DATA {
24269    #[doc = "Count of radio packet receive errors (since boot)."]
24270    pub rxerrors: u16,
24271    #[doc = "Count of error corrected radio packets (since boot)."]
24272    pub fixed: u16,
24273    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24274    pub rssi: u8,
24275    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24276    pub remrssi: u8,
24277    #[doc = "Remaining free transmitter buffer space."]
24278    pub txbuf: u8,
24279    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24280    pub noise: u8,
24281    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24282    pub remnoise: u8,
24283}
24284impl RADIO_STATUS_DATA {
24285    pub const ENCODED_LEN: usize = 9usize;
24286    pub const DEFAULT: Self = Self {
24287        rxerrors: 0_u16,
24288        fixed: 0_u16,
24289        rssi: 0_u8,
24290        remrssi: 0_u8,
24291        txbuf: 0_u8,
24292        noise: 0_u8,
24293        remnoise: 0_u8,
24294    };
24295    #[cfg(feature = "arbitrary")]
24296    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24297        use arbitrary::{Arbitrary, Unstructured};
24298        let mut buf = [0u8; 1024];
24299        rng.fill_bytes(&mut buf);
24300        let mut unstructured = Unstructured::new(&buf);
24301        Self::arbitrary(&mut unstructured).unwrap_or_default()
24302    }
24303}
24304impl Default for RADIO_STATUS_DATA {
24305    fn default() -> Self {
24306        Self::DEFAULT.clone()
24307    }
24308}
24309impl MessageData for RADIO_STATUS_DATA {
24310    type Message = MavMessage;
24311    const ID: u32 = 109u32;
24312    const NAME: &'static str = "RADIO_STATUS";
24313    const EXTRA_CRC: u8 = 185u8;
24314    const ENCODED_LEN: usize = 9usize;
24315    fn deser(
24316        _version: MavlinkVersion,
24317        __input: &[u8],
24318    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24319        let avail_len = __input.len();
24320        let mut payload_buf = [0; Self::ENCODED_LEN];
24321        let mut buf = if avail_len < Self::ENCODED_LEN {
24322            payload_buf[0..avail_len].copy_from_slice(__input);
24323            Bytes::new(&payload_buf)
24324        } else {
24325            Bytes::new(__input)
24326        };
24327        let mut __struct = Self::default();
24328        __struct.rxerrors = buf.get_u16_le();
24329        __struct.fixed = buf.get_u16_le();
24330        __struct.rssi = buf.get_u8();
24331        __struct.remrssi = buf.get_u8();
24332        __struct.txbuf = buf.get_u8();
24333        __struct.noise = buf.get_u8();
24334        __struct.remnoise = buf.get_u8();
24335        Ok(__struct)
24336    }
24337    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24338        let mut __tmp = BytesMut::new(bytes);
24339        #[allow(clippy::absurd_extreme_comparisons)]
24340        #[allow(unused_comparisons)]
24341        if __tmp.remaining() < Self::ENCODED_LEN {
24342            panic!(
24343                "buffer is too small (need {} bytes, but got {})",
24344                Self::ENCODED_LEN,
24345                __tmp.remaining(),
24346            )
24347        }
24348        __tmp.put_u16_le(self.rxerrors);
24349        __tmp.put_u16_le(self.fixed);
24350        __tmp.put_u8(self.rssi);
24351        __tmp.put_u8(self.remrssi);
24352        __tmp.put_u8(self.txbuf);
24353        __tmp.put_u8(self.noise);
24354        __tmp.put_u8(self.remnoise);
24355        if matches!(version, MavlinkVersion::V2) {
24356            let len = __tmp.len();
24357            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24358        } else {
24359            __tmp.len()
24360        }
24361    }
24362}
24363#[doc = "id: 27"]
24364#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24365#[derive(Debug, Clone, PartialEq)]
24366#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24367#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24368pub struct RAW_IMU_DATA {
24369    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24370    pub time_usec: u64,
24371    #[doc = "X acceleration (raw)"]
24372    pub xacc: i16,
24373    #[doc = "Y acceleration (raw)"]
24374    pub yacc: i16,
24375    #[doc = "Z acceleration (raw)"]
24376    pub zacc: i16,
24377    #[doc = "Angular speed around X axis (raw)"]
24378    pub xgyro: i16,
24379    #[doc = "Angular speed around Y axis (raw)"]
24380    pub ygyro: i16,
24381    #[doc = "Angular speed around Z axis (raw)"]
24382    pub zgyro: i16,
24383    #[doc = "X Magnetic field (raw)"]
24384    pub xmag: i16,
24385    #[doc = "Y Magnetic field (raw)"]
24386    pub ymag: i16,
24387    #[doc = "Z Magnetic field (raw)"]
24388    pub zmag: i16,
24389    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24390    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24391    pub id: u8,
24392    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24393    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24394    pub temperature: i16,
24395}
24396impl RAW_IMU_DATA {
24397    pub const ENCODED_LEN: usize = 29usize;
24398    pub const DEFAULT: Self = Self {
24399        time_usec: 0_u64,
24400        xacc: 0_i16,
24401        yacc: 0_i16,
24402        zacc: 0_i16,
24403        xgyro: 0_i16,
24404        ygyro: 0_i16,
24405        zgyro: 0_i16,
24406        xmag: 0_i16,
24407        ymag: 0_i16,
24408        zmag: 0_i16,
24409        id: 0_u8,
24410        temperature: 0_i16,
24411    };
24412    #[cfg(feature = "arbitrary")]
24413    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24414        use arbitrary::{Arbitrary, Unstructured};
24415        let mut buf = [0u8; 1024];
24416        rng.fill_bytes(&mut buf);
24417        let mut unstructured = Unstructured::new(&buf);
24418        Self::arbitrary(&mut unstructured).unwrap_or_default()
24419    }
24420}
24421impl Default for RAW_IMU_DATA {
24422    fn default() -> Self {
24423        Self::DEFAULT.clone()
24424    }
24425}
24426impl MessageData for RAW_IMU_DATA {
24427    type Message = MavMessage;
24428    const ID: u32 = 27u32;
24429    const NAME: &'static str = "RAW_IMU";
24430    const EXTRA_CRC: u8 = 144u8;
24431    const ENCODED_LEN: usize = 29usize;
24432    fn deser(
24433        _version: MavlinkVersion,
24434        __input: &[u8],
24435    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24436        let avail_len = __input.len();
24437        let mut payload_buf = [0; Self::ENCODED_LEN];
24438        let mut buf = if avail_len < Self::ENCODED_LEN {
24439            payload_buf[0..avail_len].copy_from_slice(__input);
24440            Bytes::new(&payload_buf)
24441        } else {
24442            Bytes::new(__input)
24443        };
24444        let mut __struct = Self::default();
24445        __struct.time_usec = buf.get_u64_le();
24446        __struct.xacc = buf.get_i16_le();
24447        __struct.yacc = buf.get_i16_le();
24448        __struct.zacc = buf.get_i16_le();
24449        __struct.xgyro = buf.get_i16_le();
24450        __struct.ygyro = buf.get_i16_le();
24451        __struct.zgyro = buf.get_i16_le();
24452        __struct.xmag = buf.get_i16_le();
24453        __struct.ymag = buf.get_i16_le();
24454        __struct.zmag = buf.get_i16_le();
24455        __struct.id = buf.get_u8();
24456        __struct.temperature = buf.get_i16_le();
24457        Ok(__struct)
24458    }
24459    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24460        let mut __tmp = BytesMut::new(bytes);
24461        #[allow(clippy::absurd_extreme_comparisons)]
24462        #[allow(unused_comparisons)]
24463        if __tmp.remaining() < Self::ENCODED_LEN {
24464            panic!(
24465                "buffer is too small (need {} bytes, but got {})",
24466                Self::ENCODED_LEN,
24467                __tmp.remaining(),
24468            )
24469        }
24470        __tmp.put_u64_le(self.time_usec);
24471        __tmp.put_i16_le(self.xacc);
24472        __tmp.put_i16_le(self.yacc);
24473        __tmp.put_i16_le(self.zacc);
24474        __tmp.put_i16_le(self.xgyro);
24475        __tmp.put_i16_le(self.ygyro);
24476        __tmp.put_i16_le(self.zgyro);
24477        __tmp.put_i16_le(self.xmag);
24478        __tmp.put_i16_le(self.ymag);
24479        __tmp.put_i16_le(self.zmag);
24480        __tmp.put_u8(self.id);
24481        __tmp.put_i16_le(self.temperature);
24482        if matches!(version, MavlinkVersion::V2) {
24483            let len = __tmp.len();
24484            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24485        } else {
24486            __tmp.len()
24487        }
24488    }
24489}
24490#[doc = "id: 28"]
24491#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24492#[derive(Debug, Clone, PartialEq)]
24493#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24494#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24495pub struct RAW_PRESSURE_DATA {
24496    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24497    pub time_usec: u64,
24498    #[doc = "Absolute pressure (raw)"]
24499    pub press_abs: i16,
24500    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
24501    pub press_diff1: i16,
24502    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
24503    pub press_diff2: i16,
24504    #[doc = "Raw Temperature measurement (raw)"]
24505    pub temperature: i16,
24506}
24507impl RAW_PRESSURE_DATA {
24508    pub const ENCODED_LEN: usize = 16usize;
24509    pub const DEFAULT: Self = Self {
24510        time_usec: 0_u64,
24511        press_abs: 0_i16,
24512        press_diff1: 0_i16,
24513        press_diff2: 0_i16,
24514        temperature: 0_i16,
24515    };
24516    #[cfg(feature = "arbitrary")]
24517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24518        use arbitrary::{Arbitrary, Unstructured};
24519        let mut buf = [0u8; 1024];
24520        rng.fill_bytes(&mut buf);
24521        let mut unstructured = Unstructured::new(&buf);
24522        Self::arbitrary(&mut unstructured).unwrap_or_default()
24523    }
24524}
24525impl Default for RAW_PRESSURE_DATA {
24526    fn default() -> Self {
24527        Self::DEFAULT.clone()
24528    }
24529}
24530impl MessageData for RAW_PRESSURE_DATA {
24531    type Message = MavMessage;
24532    const ID: u32 = 28u32;
24533    const NAME: &'static str = "RAW_PRESSURE";
24534    const EXTRA_CRC: u8 = 67u8;
24535    const ENCODED_LEN: usize = 16usize;
24536    fn deser(
24537        _version: MavlinkVersion,
24538        __input: &[u8],
24539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24540        let avail_len = __input.len();
24541        let mut payload_buf = [0; Self::ENCODED_LEN];
24542        let mut buf = if avail_len < Self::ENCODED_LEN {
24543            payload_buf[0..avail_len].copy_from_slice(__input);
24544            Bytes::new(&payload_buf)
24545        } else {
24546            Bytes::new(__input)
24547        };
24548        let mut __struct = Self::default();
24549        __struct.time_usec = buf.get_u64_le();
24550        __struct.press_abs = buf.get_i16_le();
24551        __struct.press_diff1 = buf.get_i16_le();
24552        __struct.press_diff2 = buf.get_i16_le();
24553        __struct.temperature = buf.get_i16_le();
24554        Ok(__struct)
24555    }
24556    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24557        let mut __tmp = BytesMut::new(bytes);
24558        #[allow(clippy::absurd_extreme_comparisons)]
24559        #[allow(unused_comparisons)]
24560        if __tmp.remaining() < Self::ENCODED_LEN {
24561            panic!(
24562                "buffer is too small (need {} bytes, but got {})",
24563                Self::ENCODED_LEN,
24564                __tmp.remaining(),
24565            )
24566        }
24567        __tmp.put_u64_le(self.time_usec);
24568        __tmp.put_i16_le(self.press_abs);
24569        __tmp.put_i16_le(self.press_diff1);
24570        __tmp.put_i16_le(self.press_diff2);
24571        __tmp.put_i16_le(self.temperature);
24572        if matches!(version, MavlinkVersion::V2) {
24573            let len = __tmp.len();
24574            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24575        } else {
24576            __tmp.len()
24577        }
24578    }
24579}
24580#[doc = "id: 339"]
24581#[doc = "RPM sensor data message."]
24582#[derive(Debug, Clone, PartialEq)]
24583#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24584#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24585pub struct RAW_RPM_DATA {
24586    #[doc = "Indicated rate"]
24587    pub frequency: f32,
24588    #[doc = "Index of this RPM sensor (0-indexed)"]
24589    pub index: u8,
24590}
24591impl RAW_RPM_DATA {
24592    pub const ENCODED_LEN: usize = 5usize;
24593    pub const DEFAULT: Self = Self {
24594        frequency: 0.0_f32,
24595        index: 0_u8,
24596    };
24597    #[cfg(feature = "arbitrary")]
24598    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24599        use arbitrary::{Arbitrary, Unstructured};
24600        let mut buf = [0u8; 1024];
24601        rng.fill_bytes(&mut buf);
24602        let mut unstructured = Unstructured::new(&buf);
24603        Self::arbitrary(&mut unstructured).unwrap_or_default()
24604    }
24605}
24606impl Default for RAW_RPM_DATA {
24607    fn default() -> Self {
24608        Self::DEFAULT.clone()
24609    }
24610}
24611impl MessageData for RAW_RPM_DATA {
24612    type Message = MavMessage;
24613    const ID: u32 = 339u32;
24614    const NAME: &'static str = "RAW_RPM";
24615    const EXTRA_CRC: u8 = 199u8;
24616    const ENCODED_LEN: usize = 5usize;
24617    fn deser(
24618        _version: MavlinkVersion,
24619        __input: &[u8],
24620    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24621        let avail_len = __input.len();
24622        let mut payload_buf = [0; Self::ENCODED_LEN];
24623        let mut buf = if avail_len < Self::ENCODED_LEN {
24624            payload_buf[0..avail_len].copy_from_slice(__input);
24625            Bytes::new(&payload_buf)
24626        } else {
24627            Bytes::new(__input)
24628        };
24629        let mut __struct = Self::default();
24630        __struct.frequency = buf.get_f32_le();
24631        __struct.index = buf.get_u8();
24632        Ok(__struct)
24633    }
24634    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24635        let mut __tmp = BytesMut::new(bytes);
24636        #[allow(clippy::absurd_extreme_comparisons)]
24637        #[allow(unused_comparisons)]
24638        if __tmp.remaining() < Self::ENCODED_LEN {
24639            panic!(
24640                "buffer is too small (need {} bytes, but got {})",
24641                Self::ENCODED_LEN,
24642                __tmp.remaining(),
24643            )
24644        }
24645        __tmp.put_f32_le(self.frequency);
24646        __tmp.put_u8(self.index);
24647        if matches!(version, MavlinkVersion::V2) {
24648            let len = __tmp.len();
24649            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24650        } else {
24651            __tmp.len()
24652        }
24653    }
24654}
24655#[doc = "id: 65"]
24656#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
24657#[derive(Debug, Clone, PartialEq)]
24658#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24659#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24660pub struct RC_CHANNELS_DATA {
24661    #[doc = "Timestamp (time since system boot)."]
24662    pub time_boot_ms: u32,
24663    #[doc = "RC channel 1 value."]
24664    pub chan1_raw: u16,
24665    #[doc = "RC channel 2 value."]
24666    pub chan2_raw: u16,
24667    #[doc = "RC channel 3 value."]
24668    pub chan3_raw: u16,
24669    #[doc = "RC channel 4 value."]
24670    pub chan4_raw: u16,
24671    #[doc = "RC channel 5 value."]
24672    pub chan5_raw: u16,
24673    #[doc = "RC channel 6 value."]
24674    pub chan6_raw: u16,
24675    #[doc = "RC channel 7 value."]
24676    pub chan7_raw: u16,
24677    #[doc = "RC channel 8 value."]
24678    pub chan8_raw: u16,
24679    #[doc = "RC channel 9 value."]
24680    pub chan9_raw: u16,
24681    #[doc = "RC channel 10 value."]
24682    pub chan10_raw: u16,
24683    #[doc = "RC channel 11 value."]
24684    pub chan11_raw: u16,
24685    #[doc = "RC channel 12 value."]
24686    pub chan12_raw: u16,
24687    #[doc = "RC channel 13 value."]
24688    pub chan13_raw: u16,
24689    #[doc = "RC channel 14 value."]
24690    pub chan14_raw: u16,
24691    #[doc = "RC channel 15 value."]
24692    pub chan15_raw: u16,
24693    #[doc = "RC channel 16 value."]
24694    pub chan16_raw: u16,
24695    #[doc = "RC channel 17 value."]
24696    pub chan17_raw: u16,
24697    #[doc = "RC channel 18 value."]
24698    pub chan18_raw: u16,
24699    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
24700    pub chancount: u8,
24701    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24702    pub rssi: u8,
24703}
24704impl RC_CHANNELS_DATA {
24705    pub const ENCODED_LEN: usize = 42usize;
24706    pub const DEFAULT: Self = Self {
24707        time_boot_ms: 0_u32,
24708        chan1_raw: 0_u16,
24709        chan2_raw: 0_u16,
24710        chan3_raw: 0_u16,
24711        chan4_raw: 0_u16,
24712        chan5_raw: 0_u16,
24713        chan6_raw: 0_u16,
24714        chan7_raw: 0_u16,
24715        chan8_raw: 0_u16,
24716        chan9_raw: 0_u16,
24717        chan10_raw: 0_u16,
24718        chan11_raw: 0_u16,
24719        chan12_raw: 0_u16,
24720        chan13_raw: 0_u16,
24721        chan14_raw: 0_u16,
24722        chan15_raw: 0_u16,
24723        chan16_raw: 0_u16,
24724        chan17_raw: 0_u16,
24725        chan18_raw: 0_u16,
24726        chancount: 0_u8,
24727        rssi: 0_u8,
24728    };
24729    #[cfg(feature = "arbitrary")]
24730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24731        use arbitrary::{Arbitrary, Unstructured};
24732        let mut buf = [0u8; 1024];
24733        rng.fill_bytes(&mut buf);
24734        let mut unstructured = Unstructured::new(&buf);
24735        Self::arbitrary(&mut unstructured).unwrap_or_default()
24736    }
24737}
24738impl Default for RC_CHANNELS_DATA {
24739    fn default() -> Self {
24740        Self::DEFAULT.clone()
24741    }
24742}
24743impl MessageData for RC_CHANNELS_DATA {
24744    type Message = MavMessage;
24745    const ID: u32 = 65u32;
24746    const NAME: &'static str = "RC_CHANNELS";
24747    const EXTRA_CRC: u8 = 118u8;
24748    const ENCODED_LEN: usize = 42usize;
24749    fn deser(
24750        _version: MavlinkVersion,
24751        __input: &[u8],
24752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24753        let avail_len = __input.len();
24754        let mut payload_buf = [0; Self::ENCODED_LEN];
24755        let mut buf = if avail_len < Self::ENCODED_LEN {
24756            payload_buf[0..avail_len].copy_from_slice(__input);
24757            Bytes::new(&payload_buf)
24758        } else {
24759            Bytes::new(__input)
24760        };
24761        let mut __struct = Self::default();
24762        __struct.time_boot_ms = buf.get_u32_le();
24763        __struct.chan1_raw = buf.get_u16_le();
24764        __struct.chan2_raw = buf.get_u16_le();
24765        __struct.chan3_raw = buf.get_u16_le();
24766        __struct.chan4_raw = buf.get_u16_le();
24767        __struct.chan5_raw = buf.get_u16_le();
24768        __struct.chan6_raw = buf.get_u16_le();
24769        __struct.chan7_raw = buf.get_u16_le();
24770        __struct.chan8_raw = buf.get_u16_le();
24771        __struct.chan9_raw = buf.get_u16_le();
24772        __struct.chan10_raw = buf.get_u16_le();
24773        __struct.chan11_raw = buf.get_u16_le();
24774        __struct.chan12_raw = buf.get_u16_le();
24775        __struct.chan13_raw = buf.get_u16_le();
24776        __struct.chan14_raw = buf.get_u16_le();
24777        __struct.chan15_raw = buf.get_u16_le();
24778        __struct.chan16_raw = buf.get_u16_le();
24779        __struct.chan17_raw = buf.get_u16_le();
24780        __struct.chan18_raw = buf.get_u16_le();
24781        __struct.chancount = buf.get_u8();
24782        __struct.rssi = buf.get_u8();
24783        Ok(__struct)
24784    }
24785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24786        let mut __tmp = BytesMut::new(bytes);
24787        #[allow(clippy::absurd_extreme_comparisons)]
24788        #[allow(unused_comparisons)]
24789        if __tmp.remaining() < Self::ENCODED_LEN {
24790            panic!(
24791                "buffer is too small (need {} bytes, but got {})",
24792                Self::ENCODED_LEN,
24793                __tmp.remaining(),
24794            )
24795        }
24796        __tmp.put_u32_le(self.time_boot_ms);
24797        __tmp.put_u16_le(self.chan1_raw);
24798        __tmp.put_u16_le(self.chan2_raw);
24799        __tmp.put_u16_le(self.chan3_raw);
24800        __tmp.put_u16_le(self.chan4_raw);
24801        __tmp.put_u16_le(self.chan5_raw);
24802        __tmp.put_u16_le(self.chan6_raw);
24803        __tmp.put_u16_le(self.chan7_raw);
24804        __tmp.put_u16_le(self.chan8_raw);
24805        __tmp.put_u16_le(self.chan9_raw);
24806        __tmp.put_u16_le(self.chan10_raw);
24807        __tmp.put_u16_le(self.chan11_raw);
24808        __tmp.put_u16_le(self.chan12_raw);
24809        __tmp.put_u16_le(self.chan13_raw);
24810        __tmp.put_u16_le(self.chan14_raw);
24811        __tmp.put_u16_le(self.chan15_raw);
24812        __tmp.put_u16_le(self.chan16_raw);
24813        __tmp.put_u16_le(self.chan17_raw);
24814        __tmp.put_u16_le(self.chan18_raw);
24815        __tmp.put_u8(self.chancount);
24816        __tmp.put_u8(self.rssi);
24817        if matches!(version, MavlinkVersion::V2) {
24818            let len = __tmp.len();
24819            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24820        } else {
24821            __tmp.len()
24822        }
24823    }
24824}
24825#[doc = "id: 70"]
24826#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
24827#[derive(Debug, Clone, PartialEq)]
24828#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24829#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24830pub struct RC_CHANNELS_OVERRIDE_DATA {
24831    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24832    pub chan1_raw: u16,
24833    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24834    pub chan2_raw: u16,
24835    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24836    pub chan3_raw: u16,
24837    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24838    pub chan4_raw: u16,
24839    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24840    pub chan5_raw: u16,
24841    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24842    pub chan6_raw: u16,
24843    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24844    pub chan7_raw: u16,
24845    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24846    pub chan8_raw: u16,
24847    #[doc = "System ID"]
24848    pub target_system: u8,
24849    #[doc = "Component ID"]
24850    pub target_component: u8,
24851    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24852    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24853    pub chan9_raw: u16,
24854    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24855    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24856    pub chan10_raw: u16,
24857    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24858    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24859    pub chan11_raw: u16,
24860    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24861    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24862    pub chan12_raw: u16,
24863    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24864    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24865    pub chan13_raw: u16,
24866    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24867    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24868    pub chan14_raw: u16,
24869    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24870    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24871    pub chan15_raw: u16,
24872    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24873    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24874    pub chan16_raw: u16,
24875    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24876    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24877    pub chan17_raw: u16,
24878    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24879    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24880    pub chan18_raw: u16,
24881}
24882impl RC_CHANNELS_OVERRIDE_DATA {
24883    pub const ENCODED_LEN: usize = 38usize;
24884    pub const DEFAULT: Self = Self {
24885        chan1_raw: 0_u16,
24886        chan2_raw: 0_u16,
24887        chan3_raw: 0_u16,
24888        chan4_raw: 0_u16,
24889        chan5_raw: 0_u16,
24890        chan6_raw: 0_u16,
24891        chan7_raw: 0_u16,
24892        chan8_raw: 0_u16,
24893        target_system: 0_u8,
24894        target_component: 0_u8,
24895        chan9_raw: 0_u16,
24896        chan10_raw: 0_u16,
24897        chan11_raw: 0_u16,
24898        chan12_raw: 0_u16,
24899        chan13_raw: 0_u16,
24900        chan14_raw: 0_u16,
24901        chan15_raw: 0_u16,
24902        chan16_raw: 0_u16,
24903        chan17_raw: 0_u16,
24904        chan18_raw: 0_u16,
24905    };
24906    #[cfg(feature = "arbitrary")]
24907    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24908        use arbitrary::{Arbitrary, Unstructured};
24909        let mut buf = [0u8; 1024];
24910        rng.fill_bytes(&mut buf);
24911        let mut unstructured = Unstructured::new(&buf);
24912        Self::arbitrary(&mut unstructured).unwrap_or_default()
24913    }
24914}
24915impl Default for RC_CHANNELS_OVERRIDE_DATA {
24916    fn default() -> Self {
24917        Self::DEFAULT.clone()
24918    }
24919}
24920impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
24921    type Message = MavMessage;
24922    const ID: u32 = 70u32;
24923    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
24924    const EXTRA_CRC: u8 = 124u8;
24925    const ENCODED_LEN: usize = 38usize;
24926    fn deser(
24927        _version: MavlinkVersion,
24928        __input: &[u8],
24929    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24930        let avail_len = __input.len();
24931        let mut payload_buf = [0; Self::ENCODED_LEN];
24932        let mut buf = if avail_len < Self::ENCODED_LEN {
24933            payload_buf[0..avail_len].copy_from_slice(__input);
24934            Bytes::new(&payload_buf)
24935        } else {
24936            Bytes::new(__input)
24937        };
24938        let mut __struct = Self::default();
24939        __struct.chan1_raw = buf.get_u16_le();
24940        __struct.chan2_raw = buf.get_u16_le();
24941        __struct.chan3_raw = buf.get_u16_le();
24942        __struct.chan4_raw = buf.get_u16_le();
24943        __struct.chan5_raw = buf.get_u16_le();
24944        __struct.chan6_raw = buf.get_u16_le();
24945        __struct.chan7_raw = buf.get_u16_le();
24946        __struct.chan8_raw = buf.get_u16_le();
24947        __struct.target_system = buf.get_u8();
24948        __struct.target_component = buf.get_u8();
24949        __struct.chan9_raw = buf.get_u16_le();
24950        __struct.chan10_raw = buf.get_u16_le();
24951        __struct.chan11_raw = buf.get_u16_le();
24952        __struct.chan12_raw = buf.get_u16_le();
24953        __struct.chan13_raw = buf.get_u16_le();
24954        __struct.chan14_raw = buf.get_u16_le();
24955        __struct.chan15_raw = buf.get_u16_le();
24956        __struct.chan16_raw = buf.get_u16_le();
24957        __struct.chan17_raw = buf.get_u16_le();
24958        __struct.chan18_raw = buf.get_u16_le();
24959        Ok(__struct)
24960    }
24961    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24962        let mut __tmp = BytesMut::new(bytes);
24963        #[allow(clippy::absurd_extreme_comparisons)]
24964        #[allow(unused_comparisons)]
24965        if __tmp.remaining() < Self::ENCODED_LEN {
24966            panic!(
24967                "buffer is too small (need {} bytes, but got {})",
24968                Self::ENCODED_LEN,
24969                __tmp.remaining(),
24970            )
24971        }
24972        __tmp.put_u16_le(self.chan1_raw);
24973        __tmp.put_u16_le(self.chan2_raw);
24974        __tmp.put_u16_le(self.chan3_raw);
24975        __tmp.put_u16_le(self.chan4_raw);
24976        __tmp.put_u16_le(self.chan5_raw);
24977        __tmp.put_u16_le(self.chan6_raw);
24978        __tmp.put_u16_le(self.chan7_raw);
24979        __tmp.put_u16_le(self.chan8_raw);
24980        __tmp.put_u8(self.target_system);
24981        __tmp.put_u8(self.target_component);
24982        __tmp.put_u16_le(self.chan9_raw);
24983        __tmp.put_u16_le(self.chan10_raw);
24984        __tmp.put_u16_le(self.chan11_raw);
24985        __tmp.put_u16_le(self.chan12_raw);
24986        __tmp.put_u16_le(self.chan13_raw);
24987        __tmp.put_u16_le(self.chan14_raw);
24988        __tmp.put_u16_le(self.chan15_raw);
24989        __tmp.put_u16_le(self.chan16_raw);
24990        __tmp.put_u16_le(self.chan17_raw);
24991        __tmp.put_u16_le(self.chan18_raw);
24992        if matches!(version, MavlinkVersion::V2) {
24993            let len = __tmp.len();
24994            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24995        } else {
24996            __tmp.len()
24997        }
24998    }
24999}
25000#[doc = "id: 35"]
25001#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
25002#[derive(Debug, Clone, PartialEq)]
25003#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25004#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25005pub struct RC_CHANNELS_RAW_DATA {
25006    #[doc = "Timestamp (time since system boot)."]
25007    pub time_boot_ms: u32,
25008    #[doc = "RC channel 1 value."]
25009    pub chan1_raw: u16,
25010    #[doc = "RC channel 2 value."]
25011    pub chan2_raw: u16,
25012    #[doc = "RC channel 3 value."]
25013    pub chan3_raw: u16,
25014    #[doc = "RC channel 4 value."]
25015    pub chan4_raw: u16,
25016    #[doc = "RC channel 5 value."]
25017    pub chan5_raw: u16,
25018    #[doc = "RC channel 6 value."]
25019    pub chan6_raw: u16,
25020    #[doc = "RC channel 7 value."]
25021    pub chan7_raw: u16,
25022    #[doc = "RC channel 8 value."]
25023    pub chan8_raw: u16,
25024    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25025    pub port: u8,
25026    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25027    pub rssi: u8,
25028}
25029impl RC_CHANNELS_RAW_DATA {
25030    pub const ENCODED_LEN: usize = 22usize;
25031    pub const DEFAULT: Self = Self {
25032        time_boot_ms: 0_u32,
25033        chan1_raw: 0_u16,
25034        chan2_raw: 0_u16,
25035        chan3_raw: 0_u16,
25036        chan4_raw: 0_u16,
25037        chan5_raw: 0_u16,
25038        chan6_raw: 0_u16,
25039        chan7_raw: 0_u16,
25040        chan8_raw: 0_u16,
25041        port: 0_u8,
25042        rssi: 0_u8,
25043    };
25044    #[cfg(feature = "arbitrary")]
25045    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25046        use arbitrary::{Arbitrary, Unstructured};
25047        let mut buf = [0u8; 1024];
25048        rng.fill_bytes(&mut buf);
25049        let mut unstructured = Unstructured::new(&buf);
25050        Self::arbitrary(&mut unstructured).unwrap_or_default()
25051    }
25052}
25053impl Default for RC_CHANNELS_RAW_DATA {
25054    fn default() -> Self {
25055        Self::DEFAULT.clone()
25056    }
25057}
25058impl MessageData for RC_CHANNELS_RAW_DATA {
25059    type Message = MavMessage;
25060    const ID: u32 = 35u32;
25061    const NAME: &'static str = "RC_CHANNELS_RAW";
25062    const EXTRA_CRC: u8 = 244u8;
25063    const ENCODED_LEN: usize = 22usize;
25064    fn deser(
25065        _version: MavlinkVersion,
25066        __input: &[u8],
25067    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25068        let avail_len = __input.len();
25069        let mut payload_buf = [0; Self::ENCODED_LEN];
25070        let mut buf = if avail_len < Self::ENCODED_LEN {
25071            payload_buf[0..avail_len].copy_from_slice(__input);
25072            Bytes::new(&payload_buf)
25073        } else {
25074            Bytes::new(__input)
25075        };
25076        let mut __struct = Self::default();
25077        __struct.time_boot_ms = buf.get_u32_le();
25078        __struct.chan1_raw = buf.get_u16_le();
25079        __struct.chan2_raw = buf.get_u16_le();
25080        __struct.chan3_raw = buf.get_u16_le();
25081        __struct.chan4_raw = buf.get_u16_le();
25082        __struct.chan5_raw = buf.get_u16_le();
25083        __struct.chan6_raw = buf.get_u16_le();
25084        __struct.chan7_raw = buf.get_u16_le();
25085        __struct.chan8_raw = buf.get_u16_le();
25086        __struct.port = buf.get_u8();
25087        __struct.rssi = buf.get_u8();
25088        Ok(__struct)
25089    }
25090    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25091        let mut __tmp = BytesMut::new(bytes);
25092        #[allow(clippy::absurd_extreme_comparisons)]
25093        #[allow(unused_comparisons)]
25094        if __tmp.remaining() < Self::ENCODED_LEN {
25095            panic!(
25096                "buffer is too small (need {} bytes, but got {})",
25097                Self::ENCODED_LEN,
25098                __tmp.remaining(),
25099            )
25100        }
25101        __tmp.put_u32_le(self.time_boot_ms);
25102        __tmp.put_u16_le(self.chan1_raw);
25103        __tmp.put_u16_le(self.chan2_raw);
25104        __tmp.put_u16_le(self.chan3_raw);
25105        __tmp.put_u16_le(self.chan4_raw);
25106        __tmp.put_u16_le(self.chan5_raw);
25107        __tmp.put_u16_le(self.chan6_raw);
25108        __tmp.put_u16_le(self.chan7_raw);
25109        __tmp.put_u16_le(self.chan8_raw);
25110        __tmp.put_u8(self.port);
25111        __tmp.put_u8(self.rssi);
25112        if matches!(version, MavlinkVersion::V2) {
25113            let len = __tmp.len();
25114            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25115        } else {
25116            __tmp.len()
25117        }
25118    }
25119}
25120#[doc = "id: 34"]
25121#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25122#[derive(Debug, Clone, PartialEq)]
25123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25124#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25125pub struct RC_CHANNELS_SCALED_DATA {
25126    #[doc = "Timestamp (time since system boot)."]
25127    pub time_boot_ms: u32,
25128    #[doc = "RC channel 1 value scaled."]
25129    pub chan1_scaled: i16,
25130    #[doc = "RC channel 2 value scaled."]
25131    pub chan2_scaled: i16,
25132    #[doc = "RC channel 3 value scaled."]
25133    pub chan3_scaled: i16,
25134    #[doc = "RC channel 4 value scaled."]
25135    pub chan4_scaled: i16,
25136    #[doc = "RC channel 5 value scaled."]
25137    pub chan5_scaled: i16,
25138    #[doc = "RC channel 6 value scaled."]
25139    pub chan6_scaled: i16,
25140    #[doc = "RC channel 7 value scaled."]
25141    pub chan7_scaled: i16,
25142    #[doc = "RC channel 8 value scaled."]
25143    pub chan8_scaled: i16,
25144    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25145    pub port: u8,
25146    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25147    pub rssi: u8,
25148}
25149impl RC_CHANNELS_SCALED_DATA {
25150    pub const ENCODED_LEN: usize = 22usize;
25151    pub const DEFAULT: Self = Self {
25152        time_boot_ms: 0_u32,
25153        chan1_scaled: 0_i16,
25154        chan2_scaled: 0_i16,
25155        chan3_scaled: 0_i16,
25156        chan4_scaled: 0_i16,
25157        chan5_scaled: 0_i16,
25158        chan6_scaled: 0_i16,
25159        chan7_scaled: 0_i16,
25160        chan8_scaled: 0_i16,
25161        port: 0_u8,
25162        rssi: 0_u8,
25163    };
25164    #[cfg(feature = "arbitrary")]
25165    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25166        use arbitrary::{Arbitrary, Unstructured};
25167        let mut buf = [0u8; 1024];
25168        rng.fill_bytes(&mut buf);
25169        let mut unstructured = Unstructured::new(&buf);
25170        Self::arbitrary(&mut unstructured).unwrap_or_default()
25171    }
25172}
25173impl Default for RC_CHANNELS_SCALED_DATA {
25174    fn default() -> Self {
25175        Self::DEFAULT.clone()
25176    }
25177}
25178impl MessageData for RC_CHANNELS_SCALED_DATA {
25179    type Message = MavMessage;
25180    const ID: u32 = 34u32;
25181    const NAME: &'static str = "RC_CHANNELS_SCALED";
25182    const EXTRA_CRC: u8 = 237u8;
25183    const ENCODED_LEN: usize = 22usize;
25184    fn deser(
25185        _version: MavlinkVersion,
25186        __input: &[u8],
25187    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25188        let avail_len = __input.len();
25189        let mut payload_buf = [0; Self::ENCODED_LEN];
25190        let mut buf = if avail_len < Self::ENCODED_LEN {
25191            payload_buf[0..avail_len].copy_from_slice(__input);
25192            Bytes::new(&payload_buf)
25193        } else {
25194            Bytes::new(__input)
25195        };
25196        let mut __struct = Self::default();
25197        __struct.time_boot_ms = buf.get_u32_le();
25198        __struct.chan1_scaled = buf.get_i16_le();
25199        __struct.chan2_scaled = buf.get_i16_le();
25200        __struct.chan3_scaled = buf.get_i16_le();
25201        __struct.chan4_scaled = buf.get_i16_le();
25202        __struct.chan5_scaled = buf.get_i16_le();
25203        __struct.chan6_scaled = buf.get_i16_le();
25204        __struct.chan7_scaled = buf.get_i16_le();
25205        __struct.chan8_scaled = buf.get_i16_le();
25206        __struct.port = buf.get_u8();
25207        __struct.rssi = buf.get_u8();
25208        Ok(__struct)
25209    }
25210    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25211        let mut __tmp = BytesMut::new(bytes);
25212        #[allow(clippy::absurd_extreme_comparisons)]
25213        #[allow(unused_comparisons)]
25214        if __tmp.remaining() < Self::ENCODED_LEN {
25215            panic!(
25216                "buffer is too small (need {} bytes, but got {})",
25217                Self::ENCODED_LEN,
25218                __tmp.remaining(),
25219            )
25220        }
25221        __tmp.put_u32_le(self.time_boot_ms);
25222        __tmp.put_i16_le(self.chan1_scaled);
25223        __tmp.put_i16_le(self.chan2_scaled);
25224        __tmp.put_i16_le(self.chan3_scaled);
25225        __tmp.put_i16_le(self.chan4_scaled);
25226        __tmp.put_i16_le(self.chan5_scaled);
25227        __tmp.put_i16_le(self.chan6_scaled);
25228        __tmp.put_i16_le(self.chan7_scaled);
25229        __tmp.put_i16_le(self.chan8_scaled);
25230        __tmp.put_u8(self.port);
25231        __tmp.put_u8(self.rssi);
25232        if matches!(version, MavlinkVersion::V2) {
25233            let len = __tmp.len();
25234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25235        } else {
25236            __tmp.len()
25237        }
25238    }
25239}
25240#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25241#[doc = "id: 66"]
25242#[doc = "Request a data stream."]
25243#[derive(Debug, Clone, PartialEq)]
25244#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25245#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25246pub struct REQUEST_DATA_STREAM_DATA {
25247    #[doc = "The requested message rate"]
25248    pub req_message_rate: u16,
25249    #[doc = "The target requested to send the message stream."]
25250    pub target_system: u8,
25251    #[doc = "The target requested to send the message stream."]
25252    pub target_component: u8,
25253    #[doc = "The ID of the requested data stream"]
25254    pub req_stream_id: u8,
25255    #[doc = "1 to start sending, 0 to stop sending."]
25256    pub start_stop: u8,
25257}
25258impl REQUEST_DATA_STREAM_DATA {
25259    pub const ENCODED_LEN: usize = 6usize;
25260    pub const DEFAULT: Self = Self {
25261        req_message_rate: 0_u16,
25262        target_system: 0_u8,
25263        target_component: 0_u8,
25264        req_stream_id: 0_u8,
25265        start_stop: 0_u8,
25266    };
25267    #[cfg(feature = "arbitrary")]
25268    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25269        use arbitrary::{Arbitrary, Unstructured};
25270        let mut buf = [0u8; 1024];
25271        rng.fill_bytes(&mut buf);
25272        let mut unstructured = Unstructured::new(&buf);
25273        Self::arbitrary(&mut unstructured).unwrap_or_default()
25274    }
25275}
25276impl Default for REQUEST_DATA_STREAM_DATA {
25277    fn default() -> Self {
25278        Self::DEFAULT.clone()
25279    }
25280}
25281impl MessageData for REQUEST_DATA_STREAM_DATA {
25282    type Message = MavMessage;
25283    const ID: u32 = 66u32;
25284    const NAME: &'static str = "REQUEST_DATA_STREAM";
25285    const EXTRA_CRC: u8 = 148u8;
25286    const ENCODED_LEN: usize = 6usize;
25287    fn deser(
25288        _version: MavlinkVersion,
25289        __input: &[u8],
25290    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25291        let avail_len = __input.len();
25292        let mut payload_buf = [0; Self::ENCODED_LEN];
25293        let mut buf = if avail_len < Self::ENCODED_LEN {
25294            payload_buf[0..avail_len].copy_from_slice(__input);
25295            Bytes::new(&payload_buf)
25296        } else {
25297            Bytes::new(__input)
25298        };
25299        let mut __struct = Self::default();
25300        __struct.req_message_rate = buf.get_u16_le();
25301        __struct.target_system = buf.get_u8();
25302        __struct.target_component = buf.get_u8();
25303        __struct.req_stream_id = buf.get_u8();
25304        __struct.start_stop = buf.get_u8();
25305        Ok(__struct)
25306    }
25307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25308        let mut __tmp = BytesMut::new(bytes);
25309        #[allow(clippy::absurd_extreme_comparisons)]
25310        #[allow(unused_comparisons)]
25311        if __tmp.remaining() < Self::ENCODED_LEN {
25312            panic!(
25313                "buffer is too small (need {} bytes, but got {})",
25314                Self::ENCODED_LEN,
25315                __tmp.remaining(),
25316            )
25317        }
25318        __tmp.put_u16_le(self.req_message_rate);
25319        __tmp.put_u8(self.target_system);
25320        __tmp.put_u8(self.target_component);
25321        __tmp.put_u8(self.req_stream_id);
25322        __tmp.put_u8(self.start_stop);
25323        if matches!(version, MavlinkVersion::V2) {
25324            let len = __tmp.len();
25325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25326        } else {
25327            __tmp.len()
25328        }
25329    }
25330}
25331#[doc = "id: 412"]
25332#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25333#[derive(Debug, Clone, PartialEq)]
25334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25336pub struct REQUEST_EVENT_DATA {
25337    #[doc = "First sequence number of the requested event."]
25338    pub first_sequence: u16,
25339    #[doc = "Last sequence number of the requested event."]
25340    pub last_sequence: u16,
25341    #[doc = "System ID"]
25342    pub target_system: u8,
25343    #[doc = "Component ID"]
25344    pub target_component: u8,
25345}
25346impl REQUEST_EVENT_DATA {
25347    pub const ENCODED_LEN: usize = 6usize;
25348    pub const DEFAULT: Self = Self {
25349        first_sequence: 0_u16,
25350        last_sequence: 0_u16,
25351        target_system: 0_u8,
25352        target_component: 0_u8,
25353    };
25354    #[cfg(feature = "arbitrary")]
25355    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25356        use arbitrary::{Arbitrary, Unstructured};
25357        let mut buf = [0u8; 1024];
25358        rng.fill_bytes(&mut buf);
25359        let mut unstructured = Unstructured::new(&buf);
25360        Self::arbitrary(&mut unstructured).unwrap_or_default()
25361    }
25362}
25363impl Default for REQUEST_EVENT_DATA {
25364    fn default() -> Self {
25365        Self::DEFAULT.clone()
25366    }
25367}
25368impl MessageData for REQUEST_EVENT_DATA {
25369    type Message = MavMessage;
25370    const ID: u32 = 412u32;
25371    const NAME: &'static str = "REQUEST_EVENT";
25372    const EXTRA_CRC: u8 = 33u8;
25373    const ENCODED_LEN: usize = 6usize;
25374    fn deser(
25375        _version: MavlinkVersion,
25376        __input: &[u8],
25377    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25378        let avail_len = __input.len();
25379        let mut payload_buf = [0; Self::ENCODED_LEN];
25380        let mut buf = if avail_len < Self::ENCODED_LEN {
25381            payload_buf[0..avail_len].copy_from_slice(__input);
25382            Bytes::new(&payload_buf)
25383        } else {
25384            Bytes::new(__input)
25385        };
25386        let mut __struct = Self::default();
25387        __struct.first_sequence = buf.get_u16_le();
25388        __struct.last_sequence = buf.get_u16_le();
25389        __struct.target_system = buf.get_u8();
25390        __struct.target_component = buf.get_u8();
25391        Ok(__struct)
25392    }
25393    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25394        let mut __tmp = BytesMut::new(bytes);
25395        #[allow(clippy::absurd_extreme_comparisons)]
25396        #[allow(unused_comparisons)]
25397        if __tmp.remaining() < Self::ENCODED_LEN {
25398            panic!(
25399                "buffer is too small (need {} bytes, but got {})",
25400                Self::ENCODED_LEN,
25401                __tmp.remaining(),
25402            )
25403        }
25404        __tmp.put_u16_le(self.first_sequence);
25405        __tmp.put_u16_le(self.last_sequence);
25406        __tmp.put_u8(self.target_system);
25407        __tmp.put_u8(self.target_component);
25408        if matches!(version, MavlinkVersion::V2) {
25409            let len = __tmp.len();
25410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25411        } else {
25412            __tmp.len()
25413        }
25414    }
25415}
25416#[doc = "id: 142"]
25417#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25418#[derive(Debug, Clone, PartialEq)]
25419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25421pub struct RESOURCE_REQUEST_DATA {
25422    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25423    pub request_id: u8,
25424    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25425    pub uri_type: u8,
25426    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25427    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25428    pub uri: [u8; 120],
25429    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25430    pub transfer_type: u8,
25431    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25432    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25433    pub storage: [u8; 120],
25434}
25435impl RESOURCE_REQUEST_DATA {
25436    pub const ENCODED_LEN: usize = 243usize;
25437    pub const DEFAULT: Self = Self {
25438        request_id: 0_u8,
25439        uri_type: 0_u8,
25440        uri: [0_u8; 120usize],
25441        transfer_type: 0_u8,
25442        storage: [0_u8; 120usize],
25443    };
25444    #[cfg(feature = "arbitrary")]
25445    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25446        use arbitrary::{Arbitrary, Unstructured};
25447        let mut buf = [0u8; 1024];
25448        rng.fill_bytes(&mut buf);
25449        let mut unstructured = Unstructured::new(&buf);
25450        Self::arbitrary(&mut unstructured).unwrap_or_default()
25451    }
25452}
25453impl Default for RESOURCE_REQUEST_DATA {
25454    fn default() -> Self {
25455        Self::DEFAULT.clone()
25456    }
25457}
25458impl MessageData for RESOURCE_REQUEST_DATA {
25459    type Message = MavMessage;
25460    const ID: u32 = 142u32;
25461    const NAME: &'static str = "RESOURCE_REQUEST";
25462    const EXTRA_CRC: u8 = 72u8;
25463    const ENCODED_LEN: usize = 243usize;
25464    fn deser(
25465        _version: MavlinkVersion,
25466        __input: &[u8],
25467    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25468        let avail_len = __input.len();
25469        let mut payload_buf = [0; Self::ENCODED_LEN];
25470        let mut buf = if avail_len < Self::ENCODED_LEN {
25471            payload_buf[0..avail_len].copy_from_slice(__input);
25472            Bytes::new(&payload_buf)
25473        } else {
25474            Bytes::new(__input)
25475        };
25476        let mut __struct = Self::default();
25477        __struct.request_id = buf.get_u8();
25478        __struct.uri_type = buf.get_u8();
25479        for v in &mut __struct.uri {
25480            let val = buf.get_u8();
25481            *v = val;
25482        }
25483        __struct.transfer_type = buf.get_u8();
25484        for v in &mut __struct.storage {
25485            let val = buf.get_u8();
25486            *v = val;
25487        }
25488        Ok(__struct)
25489    }
25490    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25491        let mut __tmp = BytesMut::new(bytes);
25492        #[allow(clippy::absurd_extreme_comparisons)]
25493        #[allow(unused_comparisons)]
25494        if __tmp.remaining() < Self::ENCODED_LEN {
25495            panic!(
25496                "buffer is too small (need {} bytes, but got {})",
25497                Self::ENCODED_LEN,
25498                __tmp.remaining(),
25499            )
25500        }
25501        __tmp.put_u8(self.request_id);
25502        __tmp.put_u8(self.uri_type);
25503        for val in &self.uri {
25504            __tmp.put_u8(*val);
25505        }
25506        __tmp.put_u8(self.transfer_type);
25507        for val in &self.storage {
25508            __tmp.put_u8(*val);
25509        }
25510        if matches!(version, MavlinkVersion::V2) {
25511            let len = __tmp.len();
25512            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25513        } else {
25514            __tmp.len()
25515        }
25516    }
25517}
25518#[doc = "id: 413"]
25519#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
25520#[derive(Debug, Clone, PartialEq)]
25521#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25522#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25523pub struct RESPONSE_EVENT_ERROR_DATA {
25524    #[doc = "Sequence number."]
25525    pub sequence: u16,
25526    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
25527    pub sequence_oldest_available: u16,
25528    #[doc = "System ID"]
25529    pub target_system: u8,
25530    #[doc = "Component ID"]
25531    pub target_component: u8,
25532    #[doc = "Error reason."]
25533    pub reason: MavEventErrorReason,
25534}
25535impl RESPONSE_EVENT_ERROR_DATA {
25536    pub const ENCODED_LEN: usize = 7usize;
25537    pub const DEFAULT: Self = Self {
25538        sequence: 0_u16,
25539        sequence_oldest_available: 0_u16,
25540        target_system: 0_u8,
25541        target_component: 0_u8,
25542        reason: MavEventErrorReason::DEFAULT,
25543    };
25544    #[cfg(feature = "arbitrary")]
25545    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25546        use arbitrary::{Arbitrary, Unstructured};
25547        let mut buf = [0u8; 1024];
25548        rng.fill_bytes(&mut buf);
25549        let mut unstructured = Unstructured::new(&buf);
25550        Self::arbitrary(&mut unstructured).unwrap_or_default()
25551    }
25552}
25553impl Default for RESPONSE_EVENT_ERROR_DATA {
25554    fn default() -> Self {
25555        Self::DEFAULT.clone()
25556    }
25557}
25558impl MessageData for RESPONSE_EVENT_ERROR_DATA {
25559    type Message = MavMessage;
25560    const ID: u32 = 413u32;
25561    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
25562    const EXTRA_CRC: u8 = 77u8;
25563    const ENCODED_LEN: usize = 7usize;
25564    fn deser(
25565        _version: MavlinkVersion,
25566        __input: &[u8],
25567    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25568        let avail_len = __input.len();
25569        let mut payload_buf = [0; Self::ENCODED_LEN];
25570        let mut buf = if avail_len < Self::ENCODED_LEN {
25571            payload_buf[0..avail_len].copy_from_slice(__input);
25572            Bytes::new(&payload_buf)
25573        } else {
25574            Bytes::new(__input)
25575        };
25576        let mut __struct = Self::default();
25577        __struct.sequence = buf.get_u16_le();
25578        __struct.sequence_oldest_available = buf.get_u16_le();
25579        __struct.target_system = buf.get_u8();
25580        __struct.target_component = buf.get_u8();
25581        let tmp = buf.get_u8();
25582        __struct.reason =
25583            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25584                enum_type: "MavEventErrorReason",
25585                value: tmp as u32,
25586            })?;
25587        Ok(__struct)
25588    }
25589    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25590        let mut __tmp = BytesMut::new(bytes);
25591        #[allow(clippy::absurd_extreme_comparisons)]
25592        #[allow(unused_comparisons)]
25593        if __tmp.remaining() < Self::ENCODED_LEN {
25594            panic!(
25595                "buffer is too small (need {} bytes, but got {})",
25596                Self::ENCODED_LEN,
25597                __tmp.remaining(),
25598            )
25599        }
25600        __tmp.put_u16_le(self.sequence);
25601        __tmp.put_u16_le(self.sequence_oldest_available);
25602        __tmp.put_u8(self.target_system);
25603        __tmp.put_u8(self.target_component);
25604        __tmp.put_u8(self.reason as u8);
25605        if matches!(version, MavlinkVersion::V2) {
25606            let len = __tmp.len();
25607            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25608        } else {
25609            __tmp.len()
25610        }
25611    }
25612}
25613#[doc = "id: 55"]
25614#[doc = "Read out the safety zone the MAV currently assumes."]
25615#[derive(Debug, Clone, PartialEq)]
25616#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25617#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25618pub struct SAFETY_ALLOWED_AREA_DATA {
25619    #[doc = "x position 1 / Latitude 1"]
25620    pub p1x: f32,
25621    #[doc = "y position 1 / Longitude 1"]
25622    pub p1y: f32,
25623    #[doc = "z position 1 / Altitude 1"]
25624    pub p1z: f32,
25625    #[doc = "x position 2 / Latitude 2"]
25626    pub p2x: f32,
25627    #[doc = "y position 2 / Longitude 2"]
25628    pub p2y: f32,
25629    #[doc = "z position 2 / Altitude 2"]
25630    pub p2z: f32,
25631    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
25632    pub frame: MavFrame,
25633}
25634impl SAFETY_ALLOWED_AREA_DATA {
25635    pub const ENCODED_LEN: usize = 25usize;
25636    pub const DEFAULT: Self = Self {
25637        p1x: 0.0_f32,
25638        p1y: 0.0_f32,
25639        p1z: 0.0_f32,
25640        p2x: 0.0_f32,
25641        p2y: 0.0_f32,
25642        p2z: 0.0_f32,
25643        frame: MavFrame::DEFAULT,
25644    };
25645    #[cfg(feature = "arbitrary")]
25646    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25647        use arbitrary::{Arbitrary, Unstructured};
25648        let mut buf = [0u8; 1024];
25649        rng.fill_bytes(&mut buf);
25650        let mut unstructured = Unstructured::new(&buf);
25651        Self::arbitrary(&mut unstructured).unwrap_or_default()
25652    }
25653}
25654impl Default for SAFETY_ALLOWED_AREA_DATA {
25655    fn default() -> Self {
25656        Self::DEFAULT.clone()
25657    }
25658}
25659impl MessageData for SAFETY_ALLOWED_AREA_DATA {
25660    type Message = MavMessage;
25661    const ID: u32 = 55u32;
25662    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
25663    const EXTRA_CRC: u8 = 3u8;
25664    const ENCODED_LEN: usize = 25usize;
25665    fn deser(
25666        _version: MavlinkVersion,
25667        __input: &[u8],
25668    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25669        let avail_len = __input.len();
25670        let mut payload_buf = [0; Self::ENCODED_LEN];
25671        let mut buf = if avail_len < Self::ENCODED_LEN {
25672            payload_buf[0..avail_len].copy_from_slice(__input);
25673            Bytes::new(&payload_buf)
25674        } else {
25675            Bytes::new(__input)
25676        };
25677        let mut __struct = Self::default();
25678        __struct.p1x = buf.get_f32_le();
25679        __struct.p1y = buf.get_f32_le();
25680        __struct.p1z = buf.get_f32_le();
25681        __struct.p2x = buf.get_f32_le();
25682        __struct.p2y = buf.get_f32_le();
25683        __struct.p2z = buf.get_f32_le();
25684        let tmp = buf.get_u8();
25685        __struct.frame =
25686            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25687                enum_type: "MavFrame",
25688                value: tmp as u32,
25689            })?;
25690        Ok(__struct)
25691    }
25692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25693        let mut __tmp = BytesMut::new(bytes);
25694        #[allow(clippy::absurd_extreme_comparisons)]
25695        #[allow(unused_comparisons)]
25696        if __tmp.remaining() < Self::ENCODED_LEN {
25697            panic!(
25698                "buffer is too small (need {} bytes, but got {})",
25699                Self::ENCODED_LEN,
25700                __tmp.remaining(),
25701            )
25702        }
25703        __tmp.put_f32_le(self.p1x);
25704        __tmp.put_f32_le(self.p1y);
25705        __tmp.put_f32_le(self.p1z);
25706        __tmp.put_f32_le(self.p2x);
25707        __tmp.put_f32_le(self.p2y);
25708        __tmp.put_f32_le(self.p2z);
25709        __tmp.put_u8(self.frame as u8);
25710        if matches!(version, MavlinkVersion::V2) {
25711            let len = __tmp.len();
25712            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25713        } else {
25714            __tmp.len()
25715        }
25716    }
25717}
25718#[doc = "id: 54"]
25719#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
25720#[derive(Debug, Clone, PartialEq)]
25721#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25722#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25723pub struct SAFETY_SET_ALLOWED_AREA_DATA {
25724    #[doc = "x position 1 / Latitude 1"]
25725    pub p1x: f32,
25726    #[doc = "y position 1 / Longitude 1"]
25727    pub p1y: f32,
25728    #[doc = "z position 1 / Altitude 1"]
25729    pub p1z: f32,
25730    #[doc = "x position 2 / Latitude 2"]
25731    pub p2x: f32,
25732    #[doc = "y position 2 / Longitude 2"]
25733    pub p2y: f32,
25734    #[doc = "z position 2 / Altitude 2"]
25735    pub p2z: f32,
25736    #[doc = "System ID"]
25737    pub target_system: u8,
25738    #[doc = "Component ID"]
25739    pub target_component: u8,
25740    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
25741    pub frame: MavFrame,
25742}
25743impl SAFETY_SET_ALLOWED_AREA_DATA {
25744    pub const ENCODED_LEN: usize = 27usize;
25745    pub const DEFAULT: Self = Self {
25746        p1x: 0.0_f32,
25747        p1y: 0.0_f32,
25748        p1z: 0.0_f32,
25749        p2x: 0.0_f32,
25750        p2y: 0.0_f32,
25751        p2z: 0.0_f32,
25752        target_system: 0_u8,
25753        target_component: 0_u8,
25754        frame: MavFrame::DEFAULT,
25755    };
25756    #[cfg(feature = "arbitrary")]
25757    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25758        use arbitrary::{Arbitrary, Unstructured};
25759        let mut buf = [0u8; 1024];
25760        rng.fill_bytes(&mut buf);
25761        let mut unstructured = Unstructured::new(&buf);
25762        Self::arbitrary(&mut unstructured).unwrap_or_default()
25763    }
25764}
25765impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
25766    fn default() -> Self {
25767        Self::DEFAULT.clone()
25768    }
25769}
25770impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
25771    type Message = MavMessage;
25772    const ID: u32 = 54u32;
25773    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
25774    const EXTRA_CRC: u8 = 15u8;
25775    const ENCODED_LEN: usize = 27usize;
25776    fn deser(
25777        _version: MavlinkVersion,
25778        __input: &[u8],
25779    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25780        let avail_len = __input.len();
25781        let mut payload_buf = [0; Self::ENCODED_LEN];
25782        let mut buf = if avail_len < Self::ENCODED_LEN {
25783            payload_buf[0..avail_len].copy_from_slice(__input);
25784            Bytes::new(&payload_buf)
25785        } else {
25786            Bytes::new(__input)
25787        };
25788        let mut __struct = Self::default();
25789        __struct.p1x = buf.get_f32_le();
25790        __struct.p1y = buf.get_f32_le();
25791        __struct.p1z = buf.get_f32_le();
25792        __struct.p2x = buf.get_f32_le();
25793        __struct.p2y = buf.get_f32_le();
25794        __struct.p2z = buf.get_f32_le();
25795        __struct.target_system = buf.get_u8();
25796        __struct.target_component = buf.get_u8();
25797        let tmp = buf.get_u8();
25798        __struct.frame =
25799            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25800                enum_type: "MavFrame",
25801                value: tmp as u32,
25802            })?;
25803        Ok(__struct)
25804    }
25805    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25806        let mut __tmp = BytesMut::new(bytes);
25807        #[allow(clippy::absurd_extreme_comparisons)]
25808        #[allow(unused_comparisons)]
25809        if __tmp.remaining() < Self::ENCODED_LEN {
25810            panic!(
25811                "buffer is too small (need {} bytes, but got {})",
25812                Self::ENCODED_LEN,
25813                __tmp.remaining(),
25814            )
25815        }
25816        __tmp.put_f32_le(self.p1x);
25817        __tmp.put_f32_le(self.p1y);
25818        __tmp.put_f32_le(self.p1z);
25819        __tmp.put_f32_le(self.p2x);
25820        __tmp.put_f32_le(self.p2y);
25821        __tmp.put_f32_le(self.p2z);
25822        __tmp.put_u8(self.target_system);
25823        __tmp.put_u8(self.target_component);
25824        __tmp.put_u8(self.frame as u8);
25825        if matches!(version, MavlinkVersion::V2) {
25826            let len = __tmp.len();
25827            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25828        } else {
25829            __tmp.len()
25830        }
25831    }
25832}
25833#[doc = "id: 26"]
25834#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
25835#[derive(Debug, Clone, PartialEq)]
25836#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25837#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25838pub struct SCALED_IMU_DATA {
25839    #[doc = "Timestamp (time since system boot)."]
25840    pub time_boot_ms: u32,
25841    #[doc = "X acceleration"]
25842    pub xacc: i16,
25843    #[doc = "Y acceleration"]
25844    pub yacc: i16,
25845    #[doc = "Z acceleration"]
25846    pub zacc: i16,
25847    #[doc = "Angular speed around X axis"]
25848    pub xgyro: i16,
25849    #[doc = "Angular speed around Y axis"]
25850    pub ygyro: i16,
25851    #[doc = "Angular speed around Z axis"]
25852    pub zgyro: i16,
25853    #[doc = "X Magnetic field"]
25854    pub xmag: i16,
25855    #[doc = "Y Magnetic field"]
25856    pub ymag: i16,
25857    #[doc = "Z Magnetic field"]
25858    pub zmag: i16,
25859    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25860    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25861    pub temperature: i16,
25862}
25863impl SCALED_IMU_DATA {
25864    pub const ENCODED_LEN: usize = 24usize;
25865    pub const DEFAULT: Self = Self {
25866        time_boot_ms: 0_u32,
25867        xacc: 0_i16,
25868        yacc: 0_i16,
25869        zacc: 0_i16,
25870        xgyro: 0_i16,
25871        ygyro: 0_i16,
25872        zgyro: 0_i16,
25873        xmag: 0_i16,
25874        ymag: 0_i16,
25875        zmag: 0_i16,
25876        temperature: 0_i16,
25877    };
25878    #[cfg(feature = "arbitrary")]
25879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25880        use arbitrary::{Arbitrary, Unstructured};
25881        let mut buf = [0u8; 1024];
25882        rng.fill_bytes(&mut buf);
25883        let mut unstructured = Unstructured::new(&buf);
25884        Self::arbitrary(&mut unstructured).unwrap_or_default()
25885    }
25886}
25887impl Default for SCALED_IMU_DATA {
25888    fn default() -> Self {
25889        Self::DEFAULT.clone()
25890    }
25891}
25892impl MessageData for SCALED_IMU_DATA {
25893    type Message = MavMessage;
25894    const ID: u32 = 26u32;
25895    const NAME: &'static str = "SCALED_IMU";
25896    const EXTRA_CRC: u8 = 170u8;
25897    const ENCODED_LEN: usize = 24usize;
25898    fn deser(
25899        _version: MavlinkVersion,
25900        __input: &[u8],
25901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25902        let avail_len = __input.len();
25903        let mut payload_buf = [0; Self::ENCODED_LEN];
25904        let mut buf = if avail_len < Self::ENCODED_LEN {
25905            payload_buf[0..avail_len].copy_from_slice(__input);
25906            Bytes::new(&payload_buf)
25907        } else {
25908            Bytes::new(__input)
25909        };
25910        let mut __struct = Self::default();
25911        __struct.time_boot_ms = buf.get_u32_le();
25912        __struct.xacc = buf.get_i16_le();
25913        __struct.yacc = buf.get_i16_le();
25914        __struct.zacc = buf.get_i16_le();
25915        __struct.xgyro = buf.get_i16_le();
25916        __struct.ygyro = buf.get_i16_le();
25917        __struct.zgyro = buf.get_i16_le();
25918        __struct.xmag = buf.get_i16_le();
25919        __struct.ymag = buf.get_i16_le();
25920        __struct.zmag = buf.get_i16_le();
25921        __struct.temperature = buf.get_i16_le();
25922        Ok(__struct)
25923    }
25924    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25925        let mut __tmp = BytesMut::new(bytes);
25926        #[allow(clippy::absurd_extreme_comparisons)]
25927        #[allow(unused_comparisons)]
25928        if __tmp.remaining() < Self::ENCODED_LEN {
25929            panic!(
25930                "buffer is too small (need {} bytes, but got {})",
25931                Self::ENCODED_LEN,
25932                __tmp.remaining(),
25933            )
25934        }
25935        __tmp.put_u32_le(self.time_boot_ms);
25936        __tmp.put_i16_le(self.xacc);
25937        __tmp.put_i16_le(self.yacc);
25938        __tmp.put_i16_le(self.zacc);
25939        __tmp.put_i16_le(self.xgyro);
25940        __tmp.put_i16_le(self.ygyro);
25941        __tmp.put_i16_le(self.zgyro);
25942        __tmp.put_i16_le(self.xmag);
25943        __tmp.put_i16_le(self.ymag);
25944        __tmp.put_i16_le(self.zmag);
25945        __tmp.put_i16_le(self.temperature);
25946        if matches!(version, MavlinkVersion::V2) {
25947            let len = __tmp.len();
25948            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25949        } else {
25950            __tmp.len()
25951        }
25952    }
25953}
25954#[doc = "id: 116"]
25955#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
25956#[derive(Debug, Clone, PartialEq)]
25957#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25958#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25959pub struct SCALED_IMU2_DATA {
25960    #[doc = "Timestamp (time since system boot)."]
25961    pub time_boot_ms: u32,
25962    #[doc = "X acceleration"]
25963    pub xacc: i16,
25964    #[doc = "Y acceleration"]
25965    pub yacc: i16,
25966    #[doc = "Z acceleration"]
25967    pub zacc: i16,
25968    #[doc = "Angular speed around X axis"]
25969    pub xgyro: i16,
25970    #[doc = "Angular speed around Y axis"]
25971    pub ygyro: i16,
25972    #[doc = "Angular speed around Z axis"]
25973    pub zgyro: i16,
25974    #[doc = "X Magnetic field"]
25975    pub xmag: i16,
25976    #[doc = "Y Magnetic field"]
25977    pub ymag: i16,
25978    #[doc = "Z Magnetic field"]
25979    pub zmag: i16,
25980    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25981    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25982    pub temperature: i16,
25983}
25984impl SCALED_IMU2_DATA {
25985    pub const ENCODED_LEN: usize = 24usize;
25986    pub const DEFAULT: Self = Self {
25987        time_boot_ms: 0_u32,
25988        xacc: 0_i16,
25989        yacc: 0_i16,
25990        zacc: 0_i16,
25991        xgyro: 0_i16,
25992        ygyro: 0_i16,
25993        zgyro: 0_i16,
25994        xmag: 0_i16,
25995        ymag: 0_i16,
25996        zmag: 0_i16,
25997        temperature: 0_i16,
25998    };
25999    #[cfg(feature = "arbitrary")]
26000    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26001        use arbitrary::{Arbitrary, Unstructured};
26002        let mut buf = [0u8; 1024];
26003        rng.fill_bytes(&mut buf);
26004        let mut unstructured = Unstructured::new(&buf);
26005        Self::arbitrary(&mut unstructured).unwrap_or_default()
26006    }
26007}
26008impl Default for SCALED_IMU2_DATA {
26009    fn default() -> Self {
26010        Self::DEFAULT.clone()
26011    }
26012}
26013impl MessageData for SCALED_IMU2_DATA {
26014    type Message = MavMessage;
26015    const ID: u32 = 116u32;
26016    const NAME: &'static str = "SCALED_IMU2";
26017    const EXTRA_CRC: u8 = 76u8;
26018    const ENCODED_LEN: usize = 24usize;
26019    fn deser(
26020        _version: MavlinkVersion,
26021        __input: &[u8],
26022    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26023        let avail_len = __input.len();
26024        let mut payload_buf = [0; Self::ENCODED_LEN];
26025        let mut buf = if avail_len < Self::ENCODED_LEN {
26026            payload_buf[0..avail_len].copy_from_slice(__input);
26027            Bytes::new(&payload_buf)
26028        } else {
26029            Bytes::new(__input)
26030        };
26031        let mut __struct = Self::default();
26032        __struct.time_boot_ms = buf.get_u32_le();
26033        __struct.xacc = buf.get_i16_le();
26034        __struct.yacc = buf.get_i16_le();
26035        __struct.zacc = buf.get_i16_le();
26036        __struct.xgyro = buf.get_i16_le();
26037        __struct.ygyro = buf.get_i16_le();
26038        __struct.zgyro = buf.get_i16_le();
26039        __struct.xmag = buf.get_i16_le();
26040        __struct.ymag = buf.get_i16_le();
26041        __struct.zmag = buf.get_i16_le();
26042        __struct.temperature = buf.get_i16_le();
26043        Ok(__struct)
26044    }
26045    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26046        let mut __tmp = BytesMut::new(bytes);
26047        #[allow(clippy::absurd_extreme_comparisons)]
26048        #[allow(unused_comparisons)]
26049        if __tmp.remaining() < Self::ENCODED_LEN {
26050            panic!(
26051                "buffer is too small (need {} bytes, but got {})",
26052                Self::ENCODED_LEN,
26053                __tmp.remaining(),
26054            )
26055        }
26056        __tmp.put_u32_le(self.time_boot_ms);
26057        __tmp.put_i16_le(self.xacc);
26058        __tmp.put_i16_le(self.yacc);
26059        __tmp.put_i16_le(self.zacc);
26060        __tmp.put_i16_le(self.xgyro);
26061        __tmp.put_i16_le(self.ygyro);
26062        __tmp.put_i16_le(self.zgyro);
26063        __tmp.put_i16_le(self.xmag);
26064        __tmp.put_i16_le(self.ymag);
26065        __tmp.put_i16_le(self.zmag);
26066        __tmp.put_i16_le(self.temperature);
26067        if matches!(version, MavlinkVersion::V2) {
26068            let len = __tmp.len();
26069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26070        } else {
26071            __tmp.len()
26072        }
26073    }
26074}
26075#[doc = "id: 129"]
26076#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
26077#[derive(Debug, Clone, PartialEq)]
26078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26080pub struct SCALED_IMU3_DATA {
26081    #[doc = "Timestamp (time since system boot)."]
26082    pub time_boot_ms: u32,
26083    #[doc = "X acceleration"]
26084    pub xacc: i16,
26085    #[doc = "Y acceleration"]
26086    pub yacc: i16,
26087    #[doc = "Z acceleration"]
26088    pub zacc: i16,
26089    #[doc = "Angular speed around X axis"]
26090    pub xgyro: i16,
26091    #[doc = "Angular speed around Y axis"]
26092    pub ygyro: i16,
26093    #[doc = "Angular speed around Z axis"]
26094    pub zgyro: i16,
26095    #[doc = "X Magnetic field"]
26096    pub xmag: i16,
26097    #[doc = "Y Magnetic field"]
26098    pub ymag: i16,
26099    #[doc = "Z Magnetic field"]
26100    pub zmag: i16,
26101    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26102    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26103    pub temperature: i16,
26104}
26105impl SCALED_IMU3_DATA {
26106    pub const ENCODED_LEN: usize = 24usize;
26107    pub const DEFAULT: Self = Self {
26108        time_boot_ms: 0_u32,
26109        xacc: 0_i16,
26110        yacc: 0_i16,
26111        zacc: 0_i16,
26112        xgyro: 0_i16,
26113        ygyro: 0_i16,
26114        zgyro: 0_i16,
26115        xmag: 0_i16,
26116        ymag: 0_i16,
26117        zmag: 0_i16,
26118        temperature: 0_i16,
26119    };
26120    #[cfg(feature = "arbitrary")]
26121    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26122        use arbitrary::{Arbitrary, Unstructured};
26123        let mut buf = [0u8; 1024];
26124        rng.fill_bytes(&mut buf);
26125        let mut unstructured = Unstructured::new(&buf);
26126        Self::arbitrary(&mut unstructured).unwrap_or_default()
26127    }
26128}
26129impl Default for SCALED_IMU3_DATA {
26130    fn default() -> Self {
26131        Self::DEFAULT.clone()
26132    }
26133}
26134impl MessageData for SCALED_IMU3_DATA {
26135    type Message = MavMessage;
26136    const ID: u32 = 129u32;
26137    const NAME: &'static str = "SCALED_IMU3";
26138    const EXTRA_CRC: u8 = 46u8;
26139    const ENCODED_LEN: usize = 24usize;
26140    fn deser(
26141        _version: MavlinkVersion,
26142        __input: &[u8],
26143    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26144        let avail_len = __input.len();
26145        let mut payload_buf = [0; Self::ENCODED_LEN];
26146        let mut buf = if avail_len < Self::ENCODED_LEN {
26147            payload_buf[0..avail_len].copy_from_slice(__input);
26148            Bytes::new(&payload_buf)
26149        } else {
26150            Bytes::new(__input)
26151        };
26152        let mut __struct = Self::default();
26153        __struct.time_boot_ms = buf.get_u32_le();
26154        __struct.xacc = buf.get_i16_le();
26155        __struct.yacc = buf.get_i16_le();
26156        __struct.zacc = buf.get_i16_le();
26157        __struct.xgyro = buf.get_i16_le();
26158        __struct.ygyro = buf.get_i16_le();
26159        __struct.zgyro = buf.get_i16_le();
26160        __struct.xmag = buf.get_i16_le();
26161        __struct.ymag = buf.get_i16_le();
26162        __struct.zmag = buf.get_i16_le();
26163        __struct.temperature = buf.get_i16_le();
26164        Ok(__struct)
26165    }
26166    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26167        let mut __tmp = BytesMut::new(bytes);
26168        #[allow(clippy::absurd_extreme_comparisons)]
26169        #[allow(unused_comparisons)]
26170        if __tmp.remaining() < Self::ENCODED_LEN {
26171            panic!(
26172                "buffer is too small (need {} bytes, but got {})",
26173                Self::ENCODED_LEN,
26174                __tmp.remaining(),
26175            )
26176        }
26177        __tmp.put_u32_le(self.time_boot_ms);
26178        __tmp.put_i16_le(self.xacc);
26179        __tmp.put_i16_le(self.yacc);
26180        __tmp.put_i16_le(self.zacc);
26181        __tmp.put_i16_le(self.xgyro);
26182        __tmp.put_i16_le(self.ygyro);
26183        __tmp.put_i16_le(self.zgyro);
26184        __tmp.put_i16_le(self.xmag);
26185        __tmp.put_i16_le(self.ymag);
26186        __tmp.put_i16_le(self.zmag);
26187        __tmp.put_i16_le(self.temperature);
26188        if matches!(version, MavlinkVersion::V2) {
26189            let len = __tmp.len();
26190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26191        } else {
26192            __tmp.len()
26193        }
26194    }
26195}
26196#[doc = "id: 29"]
26197#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26198#[derive(Debug, Clone, PartialEq)]
26199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26201pub struct SCALED_PRESSURE_DATA {
26202    #[doc = "Timestamp (time since system boot)."]
26203    pub time_boot_ms: u32,
26204    #[doc = "Absolute pressure"]
26205    pub press_abs: f32,
26206    #[doc = "Differential pressure 1"]
26207    pub press_diff: f32,
26208    #[doc = "Absolute pressure temperature"]
26209    pub temperature: i16,
26210    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26211    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26212    pub temperature_press_diff: i16,
26213}
26214impl SCALED_PRESSURE_DATA {
26215    pub const ENCODED_LEN: usize = 16usize;
26216    pub const DEFAULT: Self = Self {
26217        time_boot_ms: 0_u32,
26218        press_abs: 0.0_f32,
26219        press_diff: 0.0_f32,
26220        temperature: 0_i16,
26221        temperature_press_diff: 0_i16,
26222    };
26223    #[cfg(feature = "arbitrary")]
26224    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26225        use arbitrary::{Arbitrary, Unstructured};
26226        let mut buf = [0u8; 1024];
26227        rng.fill_bytes(&mut buf);
26228        let mut unstructured = Unstructured::new(&buf);
26229        Self::arbitrary(&mut unstructured).unwrap_or_default()
26230    }
26231}
26232impl Default for SCALED_PRESSURE_DATA {
26233    fn default() -> Self {
26234        Self::DEFAULT.clone()
26235    }
26236}
26237impl MessageData for SCALED_PRESSURE_DATA {
26238    type Message = MavMessage;
26239    const ID: u32 = 29u32;
26240    const NAME: &'static str = "SCALED_PRESSURE";
26241    const EXTRA_CRC: u8 = 115u8;
26242    const ENCODED_LEN: usize = 16usize;
26243    fn deser(
26244        _version: MavlinkVersion,
26245        __input: &[u8],
26246    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26247        let avail_len = __input.len();
26248        let mut payload_buf = [0; Self::ENCODED_LEN];
26249        let mut buf = if avail_len < Self::ENCODED_LEN {
26250            payload_buf[0..avail_len].copy_from_slice(__input);
26251            Bytes::new(&payload_buf)
26252        } else {
26253            Bytes::new(__input)
26254        };
26255        let mut __struct = Self::default();
26256        __struct.time_boot_ms = buf.get_u32_le();
26257        __struct.press_abs = buf.get_f32_le();
26258        __struct.press_diff = buf.get_f32_le();
26259        __struct.temperature = buf.get_i16_le();
26260        __struct.temperature_press_diff = buf.get_i16_le();
26261        Ok(__struct)
26262    }
26263    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26264        let mut __tmp = BytesMut::new(bytes);
26265        #[allow(clippy::absurd_extreme_comparisons)]
26266        #[allow(unused_comparisons)]
26267        if __tmp.remaining() < Self::ENCODED_LEN {
26268            panic!(
26269                "buffer is too small (need {} bytes, but got {})",
26270                Self::ENCODED_LEN,
26271                __tmp.remaining(),
26272            )
26273        }
26274        __tmp.put_u32_le(self.time_boot_ms);
26275        __tmp.put_f32_le(self.press_abs);
26276        __tmp.put_f32_le(self.press_diff);
26277        __tmp.put_i16_le(self.temperature);
26278        __tmp.put_i16_le(self.temperature_press_diff);
26279        if matches!(version, MavlinkVersion::V2) {
26280            let len = __tmp.len();
26281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26282        } else {
26283            __tmp.len()
26284        }
26285    }
26286}
26287#[doc = "id: 137"]
26288#[doc = "Barometer readings for 2nd barometer."]
26289#[derive(Debug, Clone, PartialEq)]
26290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26292pub struct SCALED_PRESSURE2_DATA {
26293    #[doc = "Timestamp (time since system boot)."]
26294    pub time_boot_ms: u32,
26295    #[doc = "Absolute pressure"]
26296    pub press_abs: f32,
26297    #[doc = "Differential pressure"]
26298    pub press_diff: f32,
26299    #[doc = "Absolute pressure temperature"]
26300    pub temperature: i16,
26301    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26302    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26303    pub temperature_press_diff: i16,
26304}
26305impl SCALED_PRESSURE2_DATA {
26306    pub const ENCODED_LEN: usize = 16usize;
26307    pub const DEFAULT: Self = Self {
26308        time_boot_ms: 0_u32,
26309        press_abs: 0.0_f32,
26310        press_diff: 0.0_f32,
26311        temperature: 0_i16,
26312        temperature_press_diff: 0_i16,
26313    };
26314    #[cfg(feature = "arbitrary")]
26315    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26316        use arbitrary::{Arbitrary, Unstructured};
26317        let mut buf = [0u8; 1024];
26318        rng.fill_bytes(&mut buf);
26319        let mut unstructured = Unstructured::new(&buf);
26320        Self::arbitrary(&mut unstructured).unwrap_or_default()
26321    }
26322}
26323impl Default for SCALED_PRESSURE2_DATA {
26324    fn default() -> Self {
26325        Self::DEFAULT.clone()
26326    }
26327}
26328impl MessageData for SCALED_PRESSURE2_DATA {
26329    type Message = MavMessage;
26330    const ID: u32 = 137u32;
26331    const NAME: &'static str = "SCALED_PRESSURE2";
26332    const EXTRA_CRC: u8 = 195u8;
26333    const ENCODED_LEN: usize = 16usize;
26334    fn deser(
26335        _version: MavlinkVersion,
26336        __input: &[u8],
26337    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26338        let avail_len = __input.len();
26339        let mut payload_buf = [0; Self::ENCODED_LEN];
26340        let mut buf = if avail_len < Self::ENCODED_LEN {
26341            payload_buf[0..avail_len].copy_from_slice(__input);
26342            Bytes::new(&payload_buf)
26343        } else {
26344            Bytes::new(__input)
26345        };
26346        let mut __struct = Self::default();
26347        __struct.time_boot_ms = buf.get_u32_le();
26348        __struct.press_abs = buf.get_f32_le();
26349        __struct.press_diff = buf.get_f32_le();
26350        __struct.temperature = buf.get_i16_le();
26351        __struct.temperature_press_diff = buf.get_i16_le();
26352        Ok(__struct)
26353    }
26354    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26355        let mut __tmp = BytesMut::new(bytes);
26356        #[allow(clippy::absurd_extreme_comparisons)]
26357        #[allow(unused_comparisons)]
26358        if __tmp.remaining() < Self::ENCODED_LEN {
26359            panic!(
26360                "buffer is too small (need {} bytes, but got {})",
26361                Self::ENCODED_LEN,
26362                __tmp.remaining(),
26363            )
26364        }
26365        __tmp.put_u32_le(self.time_boot_ms);
26366        __tmp.put_f32_le(self.press_abs);
26367        __tmp.put_f32_le(self.press_diff);
26368        __tmp.put_i16_le(self.temperature);
26369        __tmp.put_i16_le(self.temperature_press_diff);
26370        if matches!(version, MavlinkVersion::V2) {
26371            let len = __tmp.len();
26372            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26373        } else {
26374            __tmp.len()
26375        }
26376    }
26377}
26378#[doc = "id: 143"]
26379#[doc = "Barometer readings for 3rd barometer."]
26380#[derive(Debug, Clone, PartialEq)]
26381#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26382#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26383pub struct SCALED_PRESSURE3_DATA {
26384    #[doc = "Timestamp (time since system boot)."]
26385    pub time_boot_ms: u32,
26386    #[doc = "Absolute pressure"]
26387    pub press_abs: f32,
26388    #[doc = "Differential pressure"]
26389    pub press_diff: f32,
26390    #[doc = "Absolute pressure temperature"]
26391    pub temperature: i16,
26392    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26393    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26394    pub temperature_press_diff: i16,
26395}
26396impl SCALED_PRESSURE3_DATA {
26397    pub const ENCODED_LEN: usize = 16usize;
26398    pub const DEFAULT: Self = Self {
26399        time_boot_ms: 0_u32,
26400        press_abs: 0.0_f32,
26401        press_diff: 0.0_f32,
26402        temperature: 0_i16,
26403        temperature_press_diff: 0_i16,
26404    };
26405    #[cfg(feature = "arbitrary")]
26406    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26407        use arbitrary::{Arbitrary, Unstructured};
26408        let mut buf = [0u8; 1024];
26409        rng.fill_bytes(&mut buf);
26410        let mut unstructured = Unstructured::new(&buf);
26411        Self::arbitrary(&mut unstructured).unwrap_or_default()
26412    }
26413}
26414impl Default for SCALED_PRESSURE3_DATA {
26415    fn default() -> Self {
26416        Self::DEFAULT.clone()
26417    }
26418}
26419impl MessageData for SCALED_PRESSURE3_DATA {
26420    type Message = MavMessage;
26421    const ID: u32 = 143u32;
26422    const NAME: &'static str = "SCALED_PRESSURE3";
26423    const EXTRA_CRC: u8 = 131u8;
26424    const ENCODED_LEN: usize = 16usize;
26425    fn deser(
26426        _version: MavlinkVersion,
26427        __input: &[u8],
26428    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26429        let avail_len = __input.len();
26430        let mut payload_buf = [0; Self::ENCODED_LEN];
26431        let mut buf = if avail_len < Self::ENCODED_LEN {
26432            payload_buf[0..avail_len].copy_from_slice(__input);
26433            Bytes::new(&payload_buf)
26434        } else {
26435            Bytes::new(__input)
26436        };
26437        let mut __struct = Self::default();
26438        __struct.time_boot_ms = buf.get_u32_le();
26439        __struct.press_abs = buf.get_f32_le();
26440        __struct.press_diff = buf.get_f32_le();
26441        __struct.temperature = buf.get_i16_le();
26442        __struct.temperature_press_diff = buf.get_i16_le();
26443        Ok(__struct)
26444    }
26445    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26446        let mut __tmp = BytesMut::new(bytes);
26447        #[allow(clippy::absurd_extreme_comparisons)]
26448        #[allow(unused_comparisons)]
26449        if __tmp.remaining() < Self::ENCODED_LEN {
26450            panic!(
26451                "buffer is too small (need {} bytes, but got {})",
26452                Self::ENCODED_LEN,
26453                __tmp.remaining(),
26454            )
26455        }
26456        __tmp.put_u32_le(self.time_boot_ms);
26457        __tmp.put_f32_le(self.press_abs);
26458        __tmp.put_f32_le(self.press_diff);
26459        __tmp.put_i16_le(self.temperature);
26460        __tmp.put_i16_le(self.temperature_press_diff);
26461        if matches!(version, MavlinkVersion::V2) {
26462            let len = __tmp.len();
26463            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26464        } else {
26465            __tmp.len()
26466        }
26467    }
26468}
26469#[doc = "id: 126"]
26470#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
26471#[derive(Debug, Clone, PartialEq)]
26472#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26473#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26474pub struct SERIAL_CONTROL_DATA {
26475    #[doc = "Baudrate of transfer. Zero means no change."]
26476    pub baudrate: u32,
26477    #[doc = "Timeout for reply data"]
26478    pub timeout: u16,
26479    #[doc = "Serial control device type."]
26480    pub device: SerialControlDev,
26481    #[doc = "Bitmap of serial control flags."]
26482    pub flags: SerialControlFlag,
26483    #[doc = "how many bytes in this transfer"]
26484    pub count: u8,
26485    #[doc = "serial data"]
26486    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26487    pub data: [u8; 70],
26488    #[doc = "System ID"]
26489    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26490    pub target_system: u8,
26491    #[doc = "Component ID"]
26492    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26493    pub target_component: u8,
26494}
26495impl SERIAL_CONTROL_DATA {
26496    pub const ENCODED_LEN: usize = 81usize;
26497    pub const DEFAULT: Self = Self {
26498        baudrate: 0_u32,
26499        timeout: 0_u16,
26500        device: SerialControlDev::DEFAULT,
26501        flags: SerialControlFlag::DEFAULT,
26502        count: 0_u8,
26503        data: [0_u8; 70usize],
26504        target_system: 0_u8,
26505        target_component: 0_u8,
26506    };
26507    #[cfg(feature = "arbitrary")]
26508    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26509        use arbitrary::{Arbitrary, Unstructured};
26510        let mut buf = [0u8; 1024];
26511        rng.fill_bytes(&mut buf);
26512        let mut unstructured = Unstructured::new(&buf);
26513        Self::arbitrary(&mut unstructured).unwrap_or_default()
26514    }
26515}
26516impl Default for SERIAL_CONTROL_DATA {
26517    fn default() -> Self {
26518        Self::DEFAULT.clone()
26519    }
26520}
26521impl MessageData for SERIAL_CONTROL_DATA {
26522    type Message = MavMessage;
26523    const ID: u32 = 126u32;
26524    const NAME: &'static str = "SERIAL_CONTROL";
26525    const EXTRA_CRC: u8 = 220u8;
26526    const ENCODED_LEN: usize = 81usize;
26527    fn deser(
26528        _version: MavlinkVersion,
26529        __input: &[u8],
26530    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26531        let avail_len = __input.len();
26532        let mut payload_buf = [0; Self::ENCODED_LEN];
26533        let mut buf = if avail_len < Self::ENCODED_LEN {
26534            payload_buf[0..avail_len].copy_from_slice(__input);
26535            Bytes::new(&payload_buf)
26536        } else {
26537            Bytes::new(__input)
26538        };
26539        let mut __struct = Self::default();
26540        __struct.baudrate = buf.get_u32_le();
26541        __struct.timeout = buf.get_u16_le();
26542        let tmp = buf.get_u8();
26543        __struct.device =
26544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26545                enum_type: "SerialControlDev",
26546                value: tmp as u32,
26547            })?;
26548        let tmp = buf.get_u8();
26549        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
26550            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26551                flag_type: "SerialControlFlag",
26552                value: tmp as u32,
26553            })?;
26554        __struct.count = buf.get_u8();
26555        for v in &mut __struct.data {
26556            let val = buf.get_u8();
26557            *v = val;
26558        }
26559        __struct.target_system = buf.get_u8();
26560        __struct.target_component = buf.get_u8();
26561        Ok(__struct)
26562    }
26563    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26564        let mut __tmp = BytesMut::new(bytes);
26565        #[allow(clippy::absurd_extreme_comparisons)]
26566        #[allow(unused_comparisons)]
26567        if __tmp.remaining() < Self::ENCODED_LEN {
26568            panic!(
26569                "buffer is too small (need {} bytes, but got {})",
26570                Self::ENCODED_LEN,
26571                __tmp.remaining(),
26572            )
26573        }
26574        __tmp.put_u32_le(self.baudrate);
26575        __tmp.put_u16_le(self.timeout);
26576        __tmp.put_u8(self.device as u8);
26577        __tmp.put_u8(self.flags.bits());
26578        __tmp.put_u8(self.count);
26579        for val in &self.data {
26580            __tmp.put_u8(*val);
26581        }
26582        __tmp.put_u8(self.target_system);
26583        __tmp.put_u8(self.target_component);
26584        if matches!(version, MavlinkVersion::V2) {
26585            let len = __tmp.len();
26586            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26587        } else {
26588            __tmp.len()
26589        }
26590    }
26591}
26592#[doc = "id: 36"]
26593#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
26594#[derive(Debug, Clone, PartialEq)]
26595#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26597pub struct SERVO_OUTPUT_RAW_DATA {
26598    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26599    pub time_usec: u32,
26600    #[doc = "Servo output 1 value"]
26601    pub servo1_raw: u16,
26602    #[doc = "Servo output 2 value"]
26603    pub servo2_raw: u16,
26604    #[doc = "Servo output 3 value"]
26605    pub servo3_raw: u16,
26606    #[doc = "Servo output 4 value"]
26607    pub servo4_raw: u16,
26608    #[doc = "Servo output 5 value"]
26609    pub servo5_raw: u16,
26610    #[doc = "Servo output 6 value"]
26611    pub servo6_raw: u16,
26612    #[doc = "Servo output 7 value"]
26613    pub servo7_raw: u16,
26614    #[doc = "Servo output 8 value"]
26615    pub servo8_raw: u16,
26616    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26617    pub port: u8,
26618    #[doc = "Servo output 9 value"]
26619    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26620    pub servo9_raw: u16,
26621    #[doc = "Servo output 10 value"]
26622    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26623    pub servo10_raw: u16,
26624    #[doc = "Servo output 11 value"]
26625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26626    pub servo11_raw: u16,
26627    #[doc = "Servo output 12 value"]
26628    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26629    pub servo12_raw: u16,
26630    #[doc = "Servo output 13 value"]
26631    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26632    pub servo13_raw: u16,
26633    #[doc = "Servo output 14 value"]
26634    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26635    pub servo14_raw: u16,
26636    #[doc = "Servo output 15 value"]
26637    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26638    pub servo15_raw: u16,
26639    #[doc = "Servo output 16 value"]
26640    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26641    pub servo16_raw: u16,
26642}
26643impl SERVO_OUTPUT_RAW_DATA {
26644    pub const ENCODED_LEN: usize = 37usize;
26645    pub const DEFAULT: Self = Self {
26646        time_usec: 0_u32,
26647        servo1_raw: 0_u16,
26648        servo2_raw: 0_u16,
26649        servo3_raw: 0_u16,
26650        servo4_raw: 0_u16,
26651        servo5_raw: 0_u16,
26652        servo6_raw: 0_u16,
26653        servo7_raw: 0_u16,
26654        servo8_raw: 0_u16,
26655        port: 0_u8,
26656        servo9_raw: 0_u16,
26657        servo10_raw: 0_u16,
26658        servo11_raw: 0_u16,
26659        servo12_raw: 0_u16,
26660        servo13_raw: 0_u16,
26661        servo14_raw: 0_u16,
26662        servo15_raw: 0_u16,
26663        servo16_raw: 0_u16,
26664    };
26665    #[cfg(feature = "arbitrary")]
26666    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26667        use arbitrary::{Arbitrary, Unstructured};
26668        let mut buf = [0u8; 1024];
26669        rng.fill_bytes(&mut buf);
26670        let mut unstructured = Unstructured::new(&buf);
26671        Self::arbitrary(&mut unstructured).unwrap_or_default()
26672    }
26673}
26674impl Default for SERVO_OUTPUT_RAW_DATA {
26675    fn default() -> Self {
26676        Self::DEFAULT.clone()
26677    }
26678}
26679impl MessageData for SERVO_OUTPUT_RAW_DATA {
26680    type Message = MavMessage;
26681    const ID: u32 = 36u32;
26682    const NAME: &'static str = "SERVO_OUTPUT_RAW";
26683    const EXTRA_CRC: u8 = 222u8;
26684    const ENCODED_LEN: usize = 37usize;
26685    fn deser(
26686        _version: MavlinkVersion,
26687        __input: &[u8],
26688    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26689        let avail_len = __input.len();
26690        let mut payload_buf = [0; Self::ENCODED_LEN];
26691        let mut buf = if avail_len < Self::ENCODED_LEN {
26692            payload_buf[0..avail_len].copy_from_slice(__input);
26693            Bytes::new(&payload_buf)
26694        } else {
26695            Bytes::new(__input)
26696        };
26697        let mut __struct = Self::default();
26698        __struct.time_usec = buf.get_u32_le();
26699        __struct.servo1_raw = buf.get_u16_le();
26700        __struct.servo2_raw = buf.get_u16_le();
26701        __struct.servo3_raw = buf.get_u16_le();
26702        __struct.servo4_raw = buf.get_u16_le();
26703        __struct.servo5_raw = buf.get_u16_le();
26704        __struct.servo6_raw = buf.get_u16_le();
26705        __struct.servo7_raw = buf.get_u16_le();
26706        __struct.servo8_raw = buf.get_u16_le();
26707        __struct.port = buf.get_u8();
26708        __struct.servo9_raw = buf.get_u16_le();
26709        __struct.servo10_raw = buf.get_u16_le();
26710        __struct.servo11_raw = buf.get_u16_le();
26711        __struct.servo12_raw = buf.get_u16_le();
26712        __struct.servo13_raw = buf.get_u16_le();
26713        __struct.servo14_raw = buf.get_u16_le();
26714        __struct.servo15_raw = buf.get_u16_le();
26715        __struct.servo16_raw = buf.get_u16_le();
26716        Ok(__struct)
26717    }
26718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26719        let mut __tmp = BytesMut::new(bytes);
26720        #[allow(clippy::absurd_extreme_comparisons)]
26721        #[allow(unused_comparisons)]
26722        if __tmp.remaining() < Self::ENCODED_LEN {
26723            panic!(
26724                "buffer is too small (need {} bytes, but got {})",
26725                Self::ENCODED_LEN,
26726                __tmp.remaining(),
26727            )
26728        }
26729        __tmp.put_u32_le(self.time_usec);
26730        __tmp.put_u16_le(self.servo1_raw);
26731        __tmp.put_u16_le(self.servo2_raw);
26732        __tmp.put_u16_le(self.servo3_raw);
26733        __tmp.put_u16_le(self.servo4_raw);
26734        __tmp.put_u16_le(self.servo5_raw);
26735        __tmp.put_u16_le(self.servo6_raw);
26736        __tmp.put_u16_le(self.servo7_raw);
26737        __tmp.put_u16_le(self.servo8_raw);
26738        __tmp.put_u8(self.port);
26739        __tmp.put_u16_le(self.servo9_raw);
26740        __tmp.put_u16_le(self.servo10_raw);
26741        __tmp.put_u16_le(self.servo11_raw);
26742        __tmp.put_u16_le(self.servo12_raw);
26743        __tmp.put_u16_le(self.servo13_raw);
26744        __tmp.put_u16_le(self.servo14_raw);
26745        __tmp.put_u16_le(self.servo15_raw);
26746        __tmp.put_u16_le(self.servo16_raw);
26747        if matches!(version, MavlinkVersion::V2) {
26748            let len = __tmp.len();
26749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26750        } else {
26751            __tmp.len()
26752        }
26753    }
26754}
26755#[doc = "id: 256"]
26756#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
26757#[derive(Debug, Clone, PartialEq)]
26758#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26759#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26760pub struct SETUP_SIGNING_DATA {
26761    #[doc = "initial timestamp"]
26762    pub initial_timestamp: u64,
26763    #[doc = "system id of the target"]
26764    pub target_system: u8,
26765    #[doc = "component ID of the target"]
26766    pub target_component: u8,
26767    #[doc = "signing key"]
26768    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26769    pub secret_key: [u8; 32],
26770}
26771impl SETUP_SIGNING_DATA {
26772    pub const ENCODED_LEN: usize = 42usize;
26773    pub const DEFAULT: Self = Self {
26774        initial_timestamp: 0_u64,
26775        target_system: 0_u8,
26776        target_component: 0_u8,
26777        secret_key: [0_u8; 32usize],
26778    };
26779    #[cfg(feature = "arbitrary")]
26780    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26781        use arbitrary::{Arbitrary, Unstructured};
26782        let mut buf = [0u8; 1024];
26783        rng.fill_bytes(&mut buf);
26784        let mut unstructured = Unstructured::new(&buf);
26785        Self::arbitrary(&mut unstructured).unwrap_or_default()
26786    }
26787}
26788impl Default for SETUP_SIGNING_DATA {
26789    fn default() -> Self {
26790        Self::DEFAULT.clone()
26791    }
26792}
26793impl MessageData for SETUP_SIGNING_DATA {
26794    type Message = MavMessage;
26795    const ID: u32 = 256u32;
26796    const NAME: &'static str = "SETUP_SIGNING";
26797    const EXTRA_CRC: u8 = 71u8;
26798    const ENCODED_LEN: usize = 42usize;
26799    fn deser(
26800        _version: MavlinkVersion,
26801        __input: &[u8],
26802    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26803        let avail_len = __input.len();
26804        let mut payload_buf = [0; Self::ENCODED_LEN];
26805        let mut buf = if avail_len < Self::ENCODED_LEN {
26806            payload_buf[0..avail_len].copy_from_slice(__input);
26807            Bytes::new(&payload_buf)
26808        } else {
26809            Bytes::new(__input)
26810        };
26811        let mut __struct = Self::default();
26812        __struct.initial_timestamp = buf.get_u64_le();
26813        __struct.target_system = buf.get_u8();
26814        __struct.target_component = buf.get_u8();
26815        for v in &mut __struct.secret_key {
26816            let val = buf.get_u8();
26817            *v = val;
26818        }
26819        Ok(__struct)
26820    }
26821    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26822        let mut __tmp = BytesMut::new(bytes);
26823        #[allow(clippy::absurd_extreme_comparisons)]
26824        #[allow(unused_comparisons)]
26825        if __tmp.remaining() < Self::ENCODED_LEN {
26826            panic!(
26827                "buffer is too small (need {} bytes, but got {})",
26828                Self::ENCODED_LEN,
26829                __tmp.remaining(),
26830            )
26831        }
26832        __tmp.put_u64_le(self.initial_timestamp);
26833        __tmp.put_u8(self.target_system);
26834        __tmp.put_u8(self.target_component);
26835        for val in &self.secret_key {
26836            __tmp.put_u8(*val);
26837        }
26838        if matches!(version, MavlinkVersion::V2) {
26839            let len = __tmp.len();
26840            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26841        } else {
26842            __tmp.len()
26843        }
26844    }
26845}
26846#[doc = "id: 139"]
26847#[doc = "Set the vehicle attitude and body angular rates."]
26848#[derive(Debug, Clone, PartialEq)]
26849#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26850#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26851pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
26852    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26853    pub time_usec: u64,
26854    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
26855    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26856    pub controls: [f32; 8],
26857    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
26858    pub group_mlx: u8,
26859    #[doc = "System ID"]
26860    pub target_system: u8,
26861    #[doc = "Component ID"]
26862    pub target_component: u8,
26863}
26864impl SET_ACTUATOR_CONTROL_TARGET_DATA {
26865    pub const ENCODED_LEN: usize = 43usize;
26866    pub const DEFAULT: Self = Self {
26867        time_usec: 0_u64,
26868        controls: [0.0_f32; 8usize],
26869        group_mlx: 0_u8,
26870        target_system: 0_u8,
26871        target_component: 0_u8,
26872    };
26873    #[cfg(feature = "arbitrary")]
26874    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26875        use arbitrary::{Arbitrary, Unstructured};
26876        let mut buf = [0u8; 1024];
26877        rng.fill_bytes(&mut buf);
26878        let mut unstructured = Unstructured::new(&buf);
26879        Self::arbitrary(&mut unstructured).unwrap_or_default()
26880    }
26881}
26882impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
26883    fn default() -> Self {
26884        Self::DEFAULT.clone()
26885    }
26886}
26887impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
26888    type Message = MavMessage;
26889    const ID: u32 = 139u32;
26890    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
26891    const EXTRA_CRC: u8 = 168u8;
26892    const ENCODED_LEN: usize = 43usize;
26893    fn deser(
26894        _version: MavlinkVersion,
26895        __input: &[u8],
26896    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26897        let avail_len = __input.len();
26898        let mut payload_buf = [0; Self::ENCODED_LEN];
26899        let mut buf = if avail_len < Self::ENCODED_LEN {
26900            payload_buf[0..avail_len].copy_from_slice(__input);
26901            Bytes::new(&payload_buf)
26902        } else {
26903            Bytes::new(__input)
26904        };
26905        let mut __struct = Self::default();
26906        __struct.time_usec = buf.get_u64_le();
26907        for v in &mut __struct.controls {
26908            let val = buf.get_f32_le();
26909            *v = val;
26910        }
26911        __struct.group_mlx = buf.get_u8();
26912        __struct.target_system = buf.get_u8();
26913        __struct.target_component = buf.get_u8();
26914        Ok(__struct)
26915    }
26916    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26917        let mut __tmp = BytesMut::new(bytes);
26918        #[allow(clippy::absurd_extreme_comparisons)]
26919        #[allow(unused_comparisons)]
26920        if __tmp.remaining() < Self::ENCODED_LEN {
26921            panic!(
26922                "buffer is too small (need {} bytes, but got {})",
26923                Self::ENCODED_LEN,
26924                __tmp.remaining(),
26925            )
26926        }
26927        __tmp.put_u64_le(self.time_usec);
26928        for val in &self.controls {
26929            __tmp.put_f32_le(*val);
26930        }
26931        __tmp.put_u8(self.group_mlx);
26932        __tmp.put_u8(self.target_system);
26933        __tmp.put_u8(self.target_component);
26934        if matches!(version, MavlinkVersion::V2) {
26935            let len = __tmp.len();
26936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26937        } else {
26938            __tmp.len()
26939        }
26940    }
26941}
26942#[doc = "id: 82"]
26943#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
26944#[derive(Debug, Clone, PartialEq)]
26945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26947pub struct SET_ATTITUDE_TARGET_DATA {
26948    #[doc = "Timestamp (time since system boot)."]
26949    pub time_boot_ms: u32,
26950    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
26951    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26952    pub q: [f32; 4],
26953    #[doc = "Body roll rate"]
26954    pub body_roll_rate: f32,
26955    #[doc = "Body pitch rate"]
26956    pub body_pitch_rate: f32,
26957    #[doc = "Body yaw rate"]
26958    pub body_yaw_rate: f32,
26959    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
26960    pub thrust: f32,
26961    #[doc = "System ID"]
26962    pub target_system: u8,
26963    #[doc = "Component ID"]
26964    pub target_component: u8,
26965    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26966    pub type_mask: AttitudeTargetTypemask,
26967    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
26968    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26969    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26970    pub thrust_body: [f32; 3],
26971}
26972impl SET_ATTITUDE_TARGET_DATA {
26973    pub const ENCODED_LEN: usize = 51usize;
26974    pub const DEFAULT: Self = Self {
26975        time_boot_ms: 0_u32,
26976        q: [0.0_f32; 4usize],
26977        body_roll_rate: 0.0_f32,
26978        body_pitch_rate: 0.0_f32,
26979        body_yaw_rate: 0.0_f32,
26980        thrust: 0.0_f32,
26981        target_system: 0_u8,
26982        target_component: 0_u8,
26983        type_mask: AttitudeTargetTypemask::DEFAULT,
26984        thrust_body: [0.0_f32; 3usize],
26985    };
26986    #[cfg(feature = "arbitrary")]
26987    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26988        use arbitrary::{Arbitrary, Unstructured};
26989        let mut buf = [0u8; 1024];
26990        rng.fill_bytes(&mut buf);
26991        let mut unstructured = Unstructured::new(&buf);
26992        Self::arbitrary(&mut unstructured).unwrap_or_default()
26993    }
26994}
26995impl Default for SET_ATTITUDE_TARGET_DATA {
26996    fn default() -> Self {
26997        Self::DEFAULT.clone()
26998    }
26999}
27000impl MessageData for SET_ATTITUDE_TARGET_DATA {
27001    type Message = MavMessage;
27002    const ID: u32 = 82u32;
27003    const NAME: &'static str = "SET_ATTITUDE_TARGET";
27004    const EXTRA_CRC: u8 = 49u8;
27005    const ENCODED_LEN: usize = 51usize;
27006    fn deser(
27007        _version: MavlinkVersion,
27008        __input: &[u8],
27009    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27010        let avail_len = __input.len();
27011        let mut payload_buf = [0; Self::ENCODED_LEN];
27012        let mut buf = if avail_len < Self::ENCODED_LEN {
27013            payload_buf[0..avail_len].copy_from_slice(__input);
27014            Bytes::new(&payload_buf)
27015        } else {
27016            Bytes::new(__input)
27017        };
27018        let mut __struct = Self::default();
27019        __struct.time_boot_ms = buf.get_u32_le();
27020        for v in &mut __struct.q {
27021            let val = buf.get_f32_le();
27022            *v = val;
27023        }
27024        __struct.body_roll_rate = buf.get_f32_le();
27025        __struct.body_pitch_rate = buf.get_f32_le();
27026        __struct.body_yaw_rate = buf.get_f32_le();
27027        __struct.thrust = buf.get_f32_le();
27028        __struct.target_system = buf.get_u8();
27029        __struct.target_component = buf.get_u8();
27030        let tmp = buf.get_u8();
27031        __struct.type_mask = AttitudeTargetTypemask::from_bits(
27032            tmp & AttitudeTargetTypemask::all().bits(),
27033        )
27034        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27035            flag_type: "AttitudeTargetTypemask",
27036            value: tmp as u32,
27037        })?;
27038        for v in &mut __struct.thrust_body {
27039            let val = buf.get_f32_le();
27040            *v = val;
27041        }
27042        Ok(__struct)
27043    }
27044    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27045        let mut __tmp = BytesMut::new(bytes);
27046        #[allow(clippy::absurd_extreme_comparisons)]
27047        #[allow(unused_comparisons)]
27048        if __tmp.remaining() < Self::ENCODED_LEN {
27049            panic!(
27050                "buffer is too small (need {} bytes, but got {})",
27051                Self::ENCODED_LEN,
27052                __tmp.remaining(),
27053            )
27054        }
27055        __tmp.put_u32_le(self.time_boot_ms);
27056        for val in &self.q {
27057            __tmp.put_f32_le(*val);
27058        }
27059        __tmp.put_f32_le(self.body_roll_rate);
27060        __tmp.put_f32_le(self.body_pitch_rate);
27061        __tmp.put_f32_le(self.body_yaw_rate);
27062        __tmp.put_f32_le(self.thrust);
27063        __tmp.put_u8(self.target_system);
27064        __tmp.put_u8(self.target_component);
27065        __tmp.put_u8(self.type_mask.bits());
27066        for val in &self.thrust_body {
27067            __tmp.put_f32_le(*val);
27068        }
27069        if matches!(version, MavlinkVersion::V2) {
27070            let len = __tmp.len();
27071            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27072        } else {
27073            __tmp.len()
27074        }
27075    }
27076}
27077#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
27078#[doc = "id: 48"]
27079#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
27080#[derive(Debug, Clone, PartialEq)]
27081#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27082#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27083pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
27084    #[doc = "Latitude (WGS84)"]
27085    pub latitude: i32,
27086    #[doc = "Longitude (WGS84)"]
27087    pub longitude: i32,
27088    #[doc = "Altitude (MSL). Positive for up."]
27089    pub altitude: i32,
27090    #[doc = "System ID"]
27091    pub target_system: u8,
27092    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27093    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27094    pub time_usec: u64,
27095}
27096impl SET_GPS_GLOBAL_ORIGIN_DATA {
27097    pub const ENCODED_LEN: usize = 21usize;
27098    pub const DEFAULT: Self = Self {
27099        latitude: 0_i32,
27100        longitude: 0_i32,
27101        altitude: 0_i32,
27102        target_system: 0_u8,
27103        time_usec: 0_u64,
27104    };
27105    #[cfg(feature = "arbitrary")]
27106    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27107        use arbitrary::{Arbitrary, Unstructured};
27108        let mut buf = [0u8; 1024];
27109        rng.fill_bytes(&mut buf);
27110        let mut unstructured = Unstructured::new(&buf);
27111        Self::arbitrary(&mut unstructured).unwrap_or_default()
27112    }
27113}
27114impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27115    fn default() -> Self {
27116        Self::DEFAULT.clone()
27117    }
27118}
27119impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27120    type Message = MavMessage;
27121    const ID: u32 = 48u32;
27122    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27123    const EXTRA_CRC: u8 = 41u8;
27124    const ENCODED_LEN: usize = 21usize;
27125    fn deser(
27126        _version: MavlinkVersion,
27127        __input: &[u8],
27128    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27129        let avail_len = __input.len();
27130        let mut payload_buf = [0; Self::ENCODED_LEN];
27131        let mut buf = if avail_len < Self::ENCODED_LEN {
27132            payload_buf[0..avail_len].copy_from_slice(__input);
27133            Bytes::new(&payload_buf)
27134        } else {
27135            Bytes::new(__input)
27136        };
27137        let mut __struct = Self::default();
27138        __struct.latitude = buf.get_i32_le();
27139        __struct.longitude = buf.get_i32_le();
27140        __struct.altitude = buf.get_i32_le();
27141        __struct.target_system = buf.get_u8();
27142        __struct.time_usec = buf.get_u64_le();
27143        Ok(__struct)
27144    }
27145    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27146        let mut __tmp = BytesMut::new(bytes);
27147        #[allow(clippy::absurd_extreme_comparisons)]
27148        #[allow(unused_comparisons)]
27149        if __tmp.remaining() < Self::ENCODED_LEN {
27150            panic!(
27151                "buffer is too small (need {} bytes, but got {})",
27152                Self::ENCODED_LEN,
27153                __tmp.remaining(),
27154            )
27155        }
27156        __tmp.put_i32_le(self.latitude);
27157        __tmp.put_i32_le(self.longitude);
27158        __tmp.put_i32_le(self.altitude);
27159        __tmp.put_u8(self.target_system);
27160        __tmp.put_u64_le(self.time_usec);
27161        if matches!(version, MavlinkVersion::V2) {
27162            let len = __tmp.len();
27163            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27164        } else {
27165            __tmp.len()
27166        }
27167    }
27168}
27169#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27170#[doc = "id: 243"]
27171#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27172#[derive(Debug, Clone, PartialEq)]
27173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27174#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27175pub struct SET_HOME_POSITION_DATA {
27176    #[doc = "Latitude (WGS84)"]
27177    pub latitude: i32,
27178    #[doc = "Longitude (WGS84)"]
27179    pub longitude: i32,
27180    #[doc = "Altitude (MSL). Positive for up."]
27181    pub altitude: i32,
27182    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27183    pub x: f32,
27184    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
27185    pub y: f32,
27186    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
27187    pub z: f32,
27188    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
27189    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27190    pub q: [f32; 4],
27191    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27192    pub approach_x: f32,
27193    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27194    pub approach_y: f32,
27195    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27196    pub approach_z: f32,
27197    #[doc = "System ID."]
27198    pub target_system: u8,
27199    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27200    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27201    pub time_usec: u64,
27202}
27203impl SET_HOME_POSITION_DATA {
27204    pub const ENCODED_LEN: usize = 61usize;
27205    pub const DEFAULT: Self = Self {
27206        latitude: 0_i32,
27207        longitude: 0_i32,
27208        altitude: 0_i32,
27209        x: 0.0_f32,
27210        y: 0.0_f32,
27211        z: 0.0_f32,
27212        q: [0.0_f32; 4usize],
27213        approach_x: 0.0_f32,
27214        approach_y: 0.0_f32,
27215        approach_z: 0.0_f32,
27216        target_system: 0_u8,
27217        time_usec: 0_u64,
27218    };
27219    #[cfg(feature = "arbitrary")]
27220    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27221        use arbitrary::{Arbitrary, Unstructured};
27222        let mut buf = [0u8; 1024];
27223        rng.fill_bytes(&mut buf);
27224        let mut unstructured = Unstructured::new(&buf);
27225        Self::arbitrary(&mut unstructured).unwrap_or_default()
27226    }
27227}
27228impl Default for SET_HOME_POSITION_DATA {
27229    fn default() -> Self {
27230        Self::DEFAULT.clone()
27231    }
27232}
27233impl MessageData for SET_HOME_POSITION_DATA {
27234    type Message = MavMessage;
27235    const ID: u32 = 243u32;
27236    const NAME: &'static str = "SET_HOME_POSITION";
27237    const EXTRA_CRC: u8 = 85u8;
27238    const ENCODED_LEN: usize = 61usize;
27239    fn deser(
27240        _version: MavlinkVersion,
27241        __input: &[u8],
27242    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27243        let avail_len = __input.len();
27244        let mut payload_buf = [0; Self::ENCODED_LEN];
27245        let mut buf = if avail_len < Self::ENCODED_LEN {
27246            payload_buf[0..avail_len].copy_from_slice(__input);
27247            Bytes::new(&payload_buf)
27248        } else {
27249            Bytes::new(__input)
27250        };
27251        let mut __struct = Self::default();
27252        __struct.latitude = buf.get_i32_le();
27253        __struct.longitude = buf.get_i32_le();
27254        __struct.altitude = buf.get_i32_le();
27255        __struct.x = buf.get_f32_le();
27256        __struct.y = buf.get_f32_le();
27257        __struct.z = buf.get_f32_le();
27258        for v in &mut __struct.q {
27259            let val = buf.get_f32_le();
27260            *v = val;
27261        }
27262        __struct.approach_x = buf.get_f32_le();
27263        __struct.approach_y = buf.get_f32_le();
27264        __struct.approach_z = buf.get_f32_le();
27265        __struct.target_system = buf.get_u8();
27266        __struct.time_usec = buf.get_u64_le();
27267        Ok(__struct)
27268    }
27269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27270        let mut __tmp = BytesMut::new(bytes);
27271        #[allow(clippy::absurd_extreme_comparisons)]
27272        #[allow(unused_comparisons)]
27273        if __tmp.remaining() < Self::ENCODED_LEN {
27274            panic!(
27275                "buffer is too small (need {} bytes, but got {})",
27276                Self::ENCODED_LEN,
27277                __tmp.remaining(),
27278            )
27279        }
27280        __tmp.put_i32_le(self.latitude);
27281        __tmp.put_i32_le(self.longitude);
27282        __tmp.put_i32_le(self.altitude);
27283        __tmp.put_f32_le(self.x);
27284        __tmp.put_f32_le(self.y);
27285        __tmp.put_f32_le(self.z);
27286        for val in &self.q {
27287            __tmp.put_f32_le(*val);
27288        }
27289        __tmp.put_f32_le(self.approach_x);
27290        __tmp.put_f32_le(self.approach_y);
27291        __tmp.put_f32_le(self.approach_z);
27292        __tmp.put_u8(self.target_system);
27293        __tmp.put_u64_le(self.time_usec);
27294        if matches!(version, MavlinkVersion::V2) {
27295            let len = __tmp.len();
27296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27297        } else {
27298            __tmp.len()
27299        }
27300    }
27301}
27302#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
27303#[doc = "id: 11"]
27304#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
27305#[derive(Debug, Clone, PartialEq)]
27306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27308pub struct SET_MODE_DATA {
27309    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
27310    pub custom_mode: u32,
27311    #[doc = "The system setting the mode"]
27312    pub target_system: u8,
27313    #[doc = "The new base mode."]
27314    pub base_mode: MavMode,
27315}
27316impl SET_MODE_DATA {
27317    pub const ENCODED_LEN: usize = 6usize;
27318    pub const DEFAULT: Self = Self {
27319        custom_mode: 0_u32,
27320        target_system: 0_u8,
27321        base_mode: MavMode::DEFAULT,
27322    };
27323    #[cfg(feature = "arbitrary")]
27324    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27325        use arbitrary::{Arbitrary, Unstructured};
27326        let mut buf = [0u8; 1024];
27327        rng.fill_bytes(&mut buf);
27328        let mut unstructured = Unstructured::new(&buf);
27329        Self::arbitrary(&mut unstructured).unwrap_or_default()
27330    }
27331}
27332impl Default for SET_MODE_DATA {
27333    fn default() -> Self {
27334        Self::DEFAULT.clone()
27335    }
27336}
27337impl MessageData for SET_MODE_DATA {
27338    type Message = MavMessage;
27339    const ID: u32 = 11u32;
27340    const NAME: &'static str = "SET_MODE";
27341    const EXTRA_CRC: u8 = 89u8;
27342    const ENCODED_LEN: usize = 6usize;
27343    fn deser(
27344        _version: MavlinkVersion,
27345        __input: &[u8],
27346    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27347        let avail_len = __input.len();
27348        let mut payload_buf = [0; Self::ENCODED_LEN];
27349        let mut buf = if avail_len < Self::ENCODED_LEN {
27350            payload_buf[0..avail_len].copy_from_slice(__input);
27351            Bytes::new(&payload_buf)
27352        } else {
27353            Bytes::new(__input)
27354        };
27355        let mut __struct = Self::default();
27356        __struct.custom_mode = buf.get_u32_le();
27357        __struct.target_system = buf.get_u8();
27358        let tmp = buf.get_u8();
27359        __struct.base_mode =
27360            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27361                enum_type: "MavMode",
27362                value: tmp as u32,
27363            })?;
27364        Ok(__struct)
27365    }
27366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27367        let mut __tmp = BytesMut::new(bytes);
27368        #[allow(clippy::absurd_extreme_comparisons)]
27369        #[allow(unused_comparisons)]
27370        if __tmp.remaining() < Self::ENCODED_LEN {
27371            panic!(
27372                "buffer is too small (need {} bytes, but got {})",
27373                Self::ENCODED_LEN,
27374                __tmp.remaining(),
27375            )
27376        }
27377        __tmp.put_u32_le(self.custom_mode);
27378        __tmp.put_u8(self.target_system);
27379        __tmp.put_u8(self.base_mode as u8);
27380        if matches!(version, MavlinkVersion::V2) {
27381            let len = __tmp.len();
27382            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27383        } else {
27384            __tmp.len()
27385        }
27386    }
27387}
27388#[doc = "id: 86"]
27389#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
27390#[derive(Debug, Clone, PartialEq)]
27391#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27392#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27393pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
27394    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
27395    pub time_boot_ms: u32,
27396    #[doc = "Latitude in WGS84 frame"]
27397    pub lat_int: i32,
27398    #[doc = "Longitude in WGS84 frame"]
27399    pub lon_int: i32,
27400    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
27401    pub alt: f32,
27402    #[doc = "X velocity in NED frame"]
27403    pub vx: f32,
27404    #[doc = "Y velocity in NED frame"]
27405    pub vy: f32,
27406    #[doc = "Z velocity in NED frame"]
27407    pub vz: f32,
27408    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27409    pub afx: f32,
27410    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27411    pub afy: f32,
27412    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27413    pub afz: f32,
27414    #[doc = "yaw setpoint"]
27415    pub yaw: f32,
27416    #[doc = "yaw rate setpoint"]
27417    pub yaw_rate: f32,
27418    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27419    pub type_mask: PositionTargetTypemask,
27420    #[doc = "System ID"]
27421    pub target_system: u8,
27422    #[doc = "Component ID"]
27423    pub target_component: u8,
27424    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
27425    pub coordinate_frame: MavFrame,
27426}
27427impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
27428    pub const ENCODED_LEN: usize = 53usize;
27429    pub const DEFAULT: Self = Self {
27430        time_boot_ms: 0_u32,
27431        lat_int: 0_i32,
27432        lon_int: 0_i32,
27433        alt: 0.0_f32,
27434        vx: 0.0_f32,
27435        vy: 0.0_f32,
27436        vz: 0.0_f32,
27437        afx: 0.0_f32,
27438        afy: 0.0_f32,
27439        afz: 0.0_f32,
27440        yaw: 0.0_f32,
27441        yaw_rate: 0.0_f32,
27442        type_mask: PositionTargetTypemask::DEFAULT,
27443        target_system: 0_u8,
27444        target_component: 0_u8,
27445        coordinate_frame: MavFrame::DEFAULT,
27446    };
27447    #[cfg(feature = "arbitrary")]
27448    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27449        use arbitrary::{Arbitrary, Unstructured};
27450        let mut buf = [0u8; 1024];
27451        rng.fill_bytes(&mut buf);
27452        let mut unstructured = Unstructured::new(&buf);
27453        Self::arbitrary(&mut unstructured).unwrap_or_default()
27454    }
27455}
27456impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27457    fn default() -> Self {
27458        Self::DEFAULT.clone()
27459    }
27460}
27461impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27462    type Message = MavMessage;
27463    const ID: u32 = 86u32;
27464    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
27465    const EXTRA_CRC: u8 = 5u8;
27466    const ENCODED_LEN: usize = 53usize;
27467    fn deser(
27468        _version: MavlinkVersion,
27469        __input: &[u8],
27470    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27471        let avail_len = __input.len();
27472        let mut payload_buf = [0; Self::ENCODED_LEN];
27473        let mut buf = if avail_len < Self::ENCODED_LEN {
27474            payload_buf[0..avail_len].copy_from_slice(__input);
27475            Bytes::new(&payload_buf)
27476        } else {
27477            Bytes::new(__input)
27478        };
27479        let mut __struct = Self::default();
27480        __struct.time_boot_ms = buf.get_u32_le();
27481        __struct.lat_int = buf.get_i32_le();
27482        __struct.lon_int = buf.get_i32_le();
27483        __struct.alt = buf.get_f32_le();
27484        __struct.vx = buf.get_f32_le();
27485        __struct.vy = buf.get_f32_le();
27486        __struct.vz = buf.get_f32_le();
27487        __struct.afx = buf.get_f32_le();
27488        __struct.afy = buf.get_f32_le();
27489        __struct.afz = buf.get_f32_le();
27490        __struct.yaw = buf.get_f32_le();
27491        __struct.yaw_rate = buf.get_f32_le();
27492        let tmp = buf.get_u16_le();
27493        __struct.type_mask = PositionTargetTypemask::from_bits(
27494            tmp & PositionTargetTypemask::all().bits(),
27495        )
27496        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27497            flag_type: "PositionTargetTypemask",
27498            value: tmp as u32,
27499        })?;
27500        __struct.target_system = buf.get_u8();
27501        __struct.target_component = buf.get_u8();
27502        let tmp = buf.get_u8();
27503        __struct.coordinate_frame =
27504            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27505                enum_type: "MavFrame",
27506                value: tmp as u32,
27507            })?;
27508        Ok(__struct)
27509    }
27510    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27511        let mut __tmp = BytesMut::new(bytes);
27512        #[allow(clippy::absurd_extreme_comparisons)]
27513        #[allow(unused_comparisons)]
27514        if __tmp.remaining() < Self::ENCODED_LEN {
27515            panic!(
27516                "buffer is too small (need {} bytes, but got {})",
27517                Self::ENCODED_LEN,
27518                __tmp.remaining(),
27519            )
27520        }
27521        __tmp.put_u32_le(self.time_boot_ms);
27522        __tmp.put_i32_le(self.lat_int);
27523        __tmp.put_i32_le(self.lon_int);
27524        __tmp.put_f32_le(self.alt);
27525        __tmp.put_f32_le(self.vx);
27526        __tmp.put_f32_le(self.vy);
27527        __tmp.put_f32_le(self.vz);
27528        __tmp.put_f32_le(self.afx);
27529        __tmp.put_f32_le(self.afy);
27530        __tmp.put_f32_le(self.afz);
27531        __tmp.put_f32_le(self.yaw);
27532        __tmp.put_f32_le(self.yaw_rate);
27533        __tmp.put_u16_le(self.type_mask.bits());
27534        __tmp.put_u8(self.target_system);
27535        __tmp.put_u8(self.target_component);
27536        __tmp.put_u8(self.coordinate_frame as u8);
27537        if matches!(version, MavlinkVersion::V2) {
27538            let len = __tmp.len();
27539            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27540        } else {
27541            __tmp.len()
27542        }
27543    }
27544}
27545#[doc = "id: 84"]
27546#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
27547#[derive(Debug, Clone, PartialEq)]
27548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27550pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
27551    #[doc = "Timestamp (time since system boot)."]
27552    pub time_boot_ms: u32,
27553    #[doc = "X Position in NED frame"]
27554    pub x: f32,
27555    #[doc = "Y Position in NED frame"]
27556    pub y: f32,
27557    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
27558    pub z: f32,
27559    #[doc = "X velocity in NED frame"]
27560    pub vx: f32,
27561    #[doc = "Y velocity in NED frame"]
27562    pub vy: f32,
27563    #[doc = "Z velocity in NED frame"]
27564    pub vz: f32,
27565    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27566    pub afx: f32,
27567    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27568    pub afy: f32,
27569    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27570    pub afz: f32,
27571    #[doc = "yaw setpoint"]
27572    pub yaw: f32,
27573    #[doc = "yaw rate setpoint"]
27574    pub yaw_rate: f32,
27575    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27576    pub type_mask: PositionTargetTypemask,
27577    #[doc = "System ID"]
27578    pub target_system: u8,
27579    #[doc = "Component ID"]
27580    pub target_component: u8,
27581    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
27582    pub coordinate_frame: MavFrame,
27583}
27584impl SET_POSITION_TARGET_LOCAL_NED_DATA {
27585    pub const ENCODED_LEN: usize = 53usize;
27586    pub const DEFAULT: Self = Self {
27587        time_boot_ms: 0_u32,
27588        x: 0.0_f32,
27589        y: 0.0_f32,
27590        z: 0.0_f32,
27591        vx: 0.0_f32,
27592        vy: 0.0_f32,
27593        vz: 0.0_f32,
27594        afx: 0.0_f32,
27595        afy: 0.0_f32,
27596        afz: 0.0_f32,
27597        yaw: 0.0_f32,
27598        yaw_rate: 0.0_f32,
27599        type_mask: PositionTargetTypemask::DEFAULT,
27600        target_system: 0_u8,
27601        target_component: 0_u8,
27602        coordinate_frame: MavFrame::DEFAULT,
27603    };
27604    #[cfg(feature = "arbitrary")]
27605    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27606        use arbitrary::{Arbitrary, Unstructured};
27607        let mut buf = [0u8; 1024];
27608        rng.fill_bytes(&mut buf);
27609        let mut unstructured = Unstructured::new(&buf);
27610        Self::arbitrary(&mut unstructured).unwrap_or_default()
27611    }
27612}
27613impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
27614    fn default() -> Self {
27615        Self::DEFAULT.clone()
27616    }
27617}
27618impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
27619    type Message = MavMessage;
27620    const ID: u32 = 84u32;
27621    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
27622    const EXTRA_CRC: u8 = 143u8;
27623    const ENCODED_LEN: usize = 53usize;
27624    fn deser(
27625        _version: MavlinkVersion,
27626        __input: &[u8],
27627    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27628        let avail_len = __input.len();
27629        let mut payload_buf = [0; Self::ENCODED_LEN];
27630        let mut buf = if avail_len < Self::ENCODED_LEN {
27631            payload_buf[0..avail_len].copy_from_slice(__input);
27632            Bytes::new(&payload_buf)
27633        } else {
27634            Bytes::new(__input)
27635        };
27636        let mut __struct = Self::default();
27637        __struct.time_boot_ms = buf.get_u32_le();
27638        __struct.x = buf.get_f32_le();
27639        __struct.y = buf.get_f32_le();
27640        __struct.z = buf.get_f32_le();
27641        __struct.vx = buf.get_f32_le();
27642        __struct.vy = buf.get_f32_le();
27643        __struct.vz = buf.get_f32_le();
27644        __struct.afx = buf.get_f32_le();
27645        __struct.afy = buf.get_f32_le();
27646        __struct.afz = buf.get_f32_le();
27647        __struct.yaw = buf.get_f32_le();
27648        __struct.yaw_rate = buf.get_f32_le();
27649        let tmp = buf.get_u16_le();
27650        __struct.type_mask = PositionTargetTypemask::from_bits(
27651            tmp & PositionTargetTypemask::all().bits(),
27652        )
27653        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27654            flag_type: "PositionTargetTypemask",
27655            value: tmp as u32,
27656        })?;
27657        __struct.target_system = buf.get_u8();
27658        __struct.target_component = buf.get_u8();
27659        let tmp = buf.get_u8();
27660        __struct.coordinate_frame =
27661            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27662                enum_type: "MavFrame",
27663                value: tmp as u32,
27664            })?;
27665        Ok(__struct)
27666    }
27667    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27668        let mut __tmp = BytesMut::new(bytes);
27669        #[allow(clippy::absurd_extreme_comparisons)]
27670        #[allow(unused_comparisons)]
27671        if __tmp.remaining() < Self::ENCODED_LEN {
27672            panic!(
27673                "buffer is too small (need {} bytes, but got {})",
27674                Self::ENCODED_LEN,
27675                __tmp.remaining(),
27676            )
27677        }
27678        __tmp.put_u32_le(self.time_boot_ms);
27679        __tmp.put_f32_le(self.x);
27680        __tmp.put_f32_le(self.y);
27681        __tmp.put_f32_le(self.z);
27682        __tmp.put_f32_le(self.vx);
27683        __tmp.put_f32_le(self.vy);
27684        __tmp.put_f32_le(self.vz);
27685        __tmp.put_f32_le(self.afx);
27686        __tmp.put_f32_le(self.afy);
27687        __tmp.put_f32_le(self.afz);
27688        __tmp.put_f32_le(self.yaw);
27689        __tmp.put_f32_le(self.yaw_rate);
27690        __tmp.put_u16_le(self.type_mask.bits());
27691        __tmp.put_u8(self.target_system);
27692        __tmp.put_u8(self.target_component);
27693        __tmp.put_u8(self.coordinate_frame as u8);
27694        if matches!(version, MavlinkVersion::V2) {
27695            let len = __tmp.len();
27696            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27697        } else {
27698            __tmp.len()
27699        }
27700    }
27701}
27702#[doc = "id: 108"]
27703#[doc = "Status of simulation environment, if used."]
27704#[derive(Debug, Clone, PartialEq)]
27705#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27706#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27707pub struct SIM_STATE_DATA {
27708    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
27709    pub q1: f32,
27710    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
27711    pub q2: f32,
27712    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
27713    pub q3: f32,
27714    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
27715    pub q4: f32,
27716    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
27717    pub roll: f32,
27718    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
27719    pub pitch: f32,
27720    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
27721    pub yaw: f32,
27722    #[doc = "X acceleration"]
27723    pub xacc: f32,
27724    #[doc = "Y acceleration"]
27725    pub yacc: f32,
27726    #[doc = "Z acceleration"]
27727    pub zacc: f32,
27728    #[doc = "Angular speed around X axis"]
27729    pub xgyro: f32,
27730    #[doc = "Angular speed around Y axis"]
27731    pub ygyro: f32,
27732    #[doc = "Angular speed around Z axis"]
27733    pub zgyro: f32,
27734    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
27735    pub lat: f32,
27736    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
27737    pub lon: f32,
27738    #[doc = "Altitude"]
27739    pub alt: f32,
27740    #[doc = "Horizontal position standard deviation"]
27741    pub std_dev_horz: f32,
27742    #[doc = "Vertical position standard deviation"]
27743    pub std_dev_vert: f32,
27744    #[doc = "True velocity in north direction in earth-fixed NED frame"]
27745    pub vn: f32,
27746    #[doc = "True velocity in east direction in earth-fixed NED frame"]
27747    pub ve: f32,
27748    #[doc = "True velocity in down direction in earth-fixed NED frame"]
27749    pub vd: f32,
27750    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
27751    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27752    pub lat_int: i32,
27753    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
27754    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27755    pub lon_int: i32,
27756}
27757impl SIM_STATE_DATA {
27758    pub const ENCODED_LEN: usize = 92usize;
27759    pub const DEFAULT: Self = Self {
27760        q1: 0.0_f32,
27761        q2: 0.0_f32,
27762        q3: 0.0_f32,
27763        q4: 0.0_f32,
27764        roll: 0.0_f32,
27765        pitch: 0.0_f32,
27766        yaw: 0.0_f32,
27767        xacc: 0.0_f32,
27768        yacc: 0.0_f32,
27769        zacc: 0.0_f32,
27770        xgyro: 0.0_f32,
27771        ygyro: 0.0_f32,
27772        zgyro: 0.0_f32,
27773        lat: 0.0_f32,
27774        lon: 0.0_f32,
27775        alt: 0.0_f32,
27776        std_dev_horz: 0.0_f32,
27777        std_dev_vert: 0.0_f32,
27778        vn: 0.0_f32,
27779        ve: 0.0_f32,
27780        vd: 0.0_f32,
27781        lat_int: 0_i32,
27782        lon_int: 0_i32,
27783    };
27784    #[cfg(feature = "arbitrary")]
27785    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27786        use arbitrary::{Arbitrary, Unstructured};
27787        let mut buf = [0u8; 1024];
27788        rng.fill_bytes(&mut buf);
27789        let mut unstructured = Unstructured::new(&buf);
27790        Self::arbitrary(&mut unstructured).unwrap_or_default()
27791    }
27792}
27793impl Default for SIM_STATE_DATA {
27794    fn default() -> Self {
27795        Self::DEFAULT.clone()
27796    }
27797}
27798impl MessageData for SIM_STATE_DATA {
27799    type Message = MavMessage;
27800    const ID: u32 = 108u32;
27801    const NAME: &'static str = "SIM_STATE";
27802    const EXTRA_CRC: u8 = 32u8;
27803    const ENCODED_LEN: usize = 92usize;
27804    fn deser(
27805        _version: MavlinkVersion,
27806        __input: &[u8],
27807    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27808        let avail_len = __input.len();
27809        let mut payload_buf = [0; Self::ENCODED_LEN];
27810        let mut buf = if avail_len < Self::ENCODED_LEN {
27811            payload_buf[0..avail_len].copy_from_slice(__input);
27812            Bytes::new(&payload_buf)
27813        } else {
27814            Bytes::new(__input)
27815        };
27816        let mut __struct = Self::default();
27817        __struct.q1 = buf.get_f32_le();
27818        __struct.q2 = buf.get_f32_le();
27819        __struct.q3 = buf.get_f32_le();
27820        __struct.q4 = buf.get_f32_le();
27821        __struct.roll = buf.get_f32_le();
27822        __struct.pitch = buf.get_f32_le();
27823        __struct.yaw = buf.get_f32_le();
27824        __struct.xacc = buf.get_f32_le();
27825        __struct.yacc = buf.get_f32_le();
27826        __struct.zacc = buf.get_f32_le();
27827        __struct.xgyro = buf.get_f32_le();
27828        __struct.ygyro = buf.get_f32_le();
27829        __struct.zgyro = buf.get_f32_le();
27830        __struct.lat = buf.get_f32_le();
27831        __struct.lon = buf.get_f32_le();
27832        __struct.alt = buf.get_f32_le();
27833        __struct.std_dev_horz = buf.get_f32_le();
27834        __struct.std_dev_vert = buf.get_f32_le();
27835        __struct.vn = buf.get_f32_le();
27836        __struct.ve = buf.get_f32_le();
27837        __struct.vd = buf.get_f32_le();
27838        __struct.lat_int = buf.get_i32_le();
27839        __struct.lon_int = buf.get_i32_le();
27840        Ok(__struct)
27841    }
27842    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27843        let mut __tmp = BytesMut::new(bytes);
27844        #[allow(clippy::absurd_extreme_comparisons)]
27845        #[allow(unused_comparisons)]
27846        if __tmp.remaining() < Self::ENCODED_LEN {
27847            panic!(
27848                "buffer is too small (need {} bytes, but got {})",
27849                Self::ENCODED_LEN,
27850                __tmp.remaining(),
27851            )
27852        }
27853        __tmp.put_f32_le(self.q1);
27854        __tmp.put_f32_le(self.q2);
27855        __tmp.put_f32_le(self.q3);
27856        __tmp.put_f32_le(self.q4);
27857        __tmp.put_f32_le(self.roll);
27858        __tmp.put_f32_le(self.pitch);
27859        __tmp.put_f32_le(self.yaw);
27860        __tmp.put_f32_le(self.xacc);
27861        __tmp.put_f32_le(self.yacc);
27862        __tmp.put_f32_le(self.zacc);
27863        __tmp.put_f32_le(self.xgyro);
27864        __tmp.put_f32_le(self.ygyro);
27865        __tmp.put_f32_le(self.zgyro);
27866        __tmp.put_f32_le(self.lat);
27867        __tmp.put_f32_le(self.lon);
27868        __tmp.put_f32_le(self.alt);
27869        __tmp.put_f32_le(self.std_dev_horz);
27870        __tmp.put_f32_le(self.std_dev_vert);
27871        __tmp.put_f32_le(self.vn);
27872        __tmp.put_f32_le(self.ve);
27873        __tmp.put_f32_le(self.vd);
27874        __tmp.put_i32_le(self.lat_int);
27875        __tmp.put_i32_le(self.lon_int);
27876        if matches!(version, MavlinkVersion::V2) {
27877            let len = __tmp.len();
27878            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27879        } else {
27880            __tmp.len()
27881        }
27882    }
27883}
27884#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
27885#[doc = "id: 370"]
27886#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
27887#[derive(Debug, Clone, PartialEq)]
27888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27889#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27890pub struct SMART_BATTERY_INFO_DATA {
27891    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
27892    pub capacity_full_specification: i32,
27893    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
27894    pub capacity_full: i32,
27895    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
27896    pub cycle_count: u16,
27897    #[doc = "Battery weight. 0: field not provided."]
27898    pub weight: u16,
27899    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
27900    pub discharge_minimum_voltage: u16,
27901    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
27902    pub charging_minimum_voltage: u16,
27903    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
27904    pub resting_minimum_voltage: u16,
27905    #[doc = "Battery ID"]
27906    pub id: u8,
27907    #[doc = "Function of the battery"]
27908    pub battery_function: MavBatteryFunction,
27909    #[doc = "Type (chemistry) of the battery"]
27910    pub mavtype: MavBatteryType,
27911    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
27912    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27913    pub serial_number: [u8; 16],
27914    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
27915    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27916    pub device_name: [u8; 50],
27917    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
27918    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27919    pub charging_maximum_voltage: u16,
27920    #[doc = "Number of battery cells in series. 0: field not provided."]
27921    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27922    pub cells_in_series: u8,
27923    #[doc = "Maximum pack discharge current. 0: field not provided."]
27924    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27925    pub discharge_maximum_current: u32,
27926    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
27927    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27928    pub discharge_maximum_burst_current: u32,
27929    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
27930    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27931    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27932    pub manufacture_date: [u8; 11],
27933}
27934impl SMART_BATTERY_INFO_DATA {
27935    pub const ENCODED_LEN: usize = 109usize;
27936    pub const DEFAULT: Self = Self {
27937        capacity_full_specification: 0_i32,
27938        capacity_full: 0_i32,
27939        cycle_count: 0_u16,
27940        weight: 0_u16,
27941        discharge_minimum_voltage: 0_u16,
27942        charging_minimum_voltage: 0_u16,
27943        resting_minimum_voltage: 0_u16,
27944        id: 0_u8,
27945        battery_function: MavBatteryFunction::DEFAULT,
27946        mavtype: MavBatteryType::DEFAULT,
27947        serial_number: [0_u8; 16usize],
27948        device_name: [0_u8; 50usize],
27949        charging_maximum_voltage: 0_u16,
27950        cells_in_series: 0_u8,
27951        discharge_maximum_current: 0_u32,
27952        discharge_maximum_burst_current: 0_u32,
27953        manufacture_date: [0_u8; 11usize],
27954    };
27955    #[cfg(feature = "arbitrary")]
27956    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27957        use arbitrary::{Arbitrary, Unstructured};
27958        let mut buf = [0u8; 1024];
27959        rng.fill_bytes(&mut buf);
27960        let mut unstructured = Unstructured::new(&buf);
27961        Self::arbitrary(&mut unstructured).unwrap_or_default()
27962    }
27963}
27964impl Default for SMART_BATTERY_INFO_DATA {
27965    fn default() -> Self {
27966        Self::DEFAULT.clone()
27967    }
27968}
27969impl MessageData for SMART_BATTERY_INFO_DATA {
27970    type Message = MavMessage;
27971    const ID: u32 = 370u32;
27972    const NAME: &'static str = "SMART_BATTERY_INFO";
27973    const EXTRA_CRC: u8 = 75u8;
27974    const ENCODED_LEN: usize = 109usize;
27975    fn deser(
27976        _version: MavlinkVersion,
27977        __input: &[u8],
27978    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27979        let avail_len = __input.len();
27980        let mut payload_buf = [0; Self::ENCODED_LEN];
27981        let mut buf = if avail_len < Self::ENCODED_LEN {
27982            payload_buf[0..avail_len].copy_from_slice(__input);
27983            Bytes::new(&payload_buf)
27984        } else {
27985            Bytes::new(__input)
27986        };
27987        let mut __struct = Self::default();
27988        __struct.capacity_full_specification = buf.get_i32_le();
27989        __struct.capacity_full = buf.get_i32_le();
27990        __struct.cycle_count = buf.get_u16_le();
27991        __struct.weight = buf.get_u16_le();
27992        __struct.discharge_minimum_voltage = buf.get_u16_le();
27993        __struct.charging_minimum_voltage = buf.get_u16_le();
27994        __struct.resting_minimum_voltage = buf.get_u16_le();
27995        __struct.id = buf.get_u8();
27996        let tmp = buf.get_u8();
27997        __struct.battery_function =
27998            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27999                enum_type: "MavBatteryFunction",
28000                value: tmp as u32,
28001            })?;
28002        let tmp = buf.get_u8();
28003        __struct.mavtype =
28004            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28005                enum_type: "MavBatteryType",
28006                value: tmp as u32,
28007            })?;
28008        for v in &mut __struct.serial_number {
28009            let val = buf.get_u8();
28010            *v = val;
28011        }
28012        for v in &mut __struct.device_name {
28013            let val = buf.get_u8();
28014            *v = val;
28015        }
28016        __struct.charging_maximum_voltage = buf.get_u16_le();
28017        __struct.cells_in_series = buf.get_u8();
28018        __struct.discharge_maximum_current = buf.get_u32_le();
28019        __struct.discharge_maximum_burst_current = buf.get_u32_le();
28020        for v in &mut __struct.manufacture_date {
28021            let val = buf.get_u8();
28022            *v = val;
28023        }
28024        Ok(__struct)
28025    }
28026    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28027        let mut __tmp = BytesMut::new(bytes);
28028        #[allow(clippy::absurd_extreme_comparisons)]
28029        #[allow(unused_comparisons)]
28030        if __tmp.remaining() < Self::ENCODED_LEN {
28031            panic!(
28032                "buffer is too small (need {} bytes, but got {})",
28033                Self::ENCODED_LEN,
28034                __tmp.remaining(),
28035            )
28036        }
28037        __tmp.put_i32_le(self.capacity_full_specification);
28038        __tmp.put_i32_le(self.capacity_full);
28039        __tmp.put_u16_le(self.cycle_count);
28040        __tmp.put_u16_le(self.weight);
28041        __tmp.put_u16_le(self.discharge_minimum_voltage);
28042        __tmp.put_u16_le(self.charging_minimum_voltage);
28043        __tmp.put_u16_le(self.resting_minimum_voltage);
28044        __tmp.put_u8(self.id);
28045        __tmp.put_u8(self.battery_function as u8);
28046        __tmp.put_u8(self.mavtype as u8);
28047        for val in &self.serial_number {
28048            __tmp.put_u8(*val);
28049        }
28050        for val in &self.device_name {
28051            __tmp.put_u8(*val);
28052        }
28053        __tmp.put_u16_le(self.charging_maximum_voltage);
28054        __tmp.put_u8(self.cells_in_series);
28055        __tmp.put_u32_le(self.discharge_maximum_current);
28056        __tmp.put_u32_le(self.discharge_maximum_burst_current);
28057        for val in &self.manufacture_date {
28058            __tmp.put_u8(*val);
28059        }
28060        if matches!(version, MavlinkVersion::V2) {
28061            let len = __tmp.len();
28062            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28063        } else {
28064            __tmp.len()
28065        }
28066    }
28067}
28068#[doc = "id: 253"]
28069#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
28070#[derive(Debug, Clone, PartialEq)]
28071#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28072#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28073pub struct STATUSTEXT_DATA {
28074    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
28075    pub severity: MavSeverity,
28076    #[doc = "Status text message, without null termination character"]
28077    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28078    pub text: [u8; 50],
28079    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
28080    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28081    pub id: u16,
28082    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
28083    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28084    pub chunk_seq: u8,
28085}
28086impl STATUSTEXT_DATA {
28087    pub const ENCODED_LEN: usize = 54usize;
28088    pub const DEFAULT: Self = Self {
28089        severity: MavSeverity::DEFAULT,
28090        text: [0_u8; 50usize],
28091        id: 0_u16,
28092        chunk_seq: 0_u8,
28093    };
28094    #[cfg(feature = "arbitrary")]
28095    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28096        use arbitrary::{Arbitrary, Unstructured};
28097        let mut buf = [0u8; 1024];
28098        rng.fill_bytes(&mut buf);
28099        let mut unstructured = Unstructured::new(&buf);
28100        Self::arbitrary(&mut unstructured).unwrap_or_default()
28101    }
28102}
28103impl Default for STATUSTEXT_DATA {
28104    fn default() -> Self {
28105        Self::DEFAULT.clone()
28106    }
28107}
28108impl MessageData for STATUSTEXT_DATA {
28109    type Message = MavMessage;
28110    const ID: u32 = 253u32;
28111    const NAME: &'static str = "STATUSTEXT";
28112    const EXTRA_CRC: u8 = 83u8;
28113    const ENCODED_LEN: usize = 54usize;
28114    fn deser(
28115        _version: MavlinkVersion,
28116        __input: &[u8],
28117    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28118        let avail_len = __input.len();
28119        let mut payload_buf = [0; Self::ENCODED_LEN];
28120        let mut buf = if avail_len < Self::ENCODED_LEN {
28121            payload_buf[0..avail_len].copy_from_slice(__input);
28122            Bytes::new(&payload_buf)
28123        } else {
28124            Bytes::new(__input)
28125        };
28126        let mut __struct = Self::default();
28127        let tmp = buf.get_u8();
28128        __struct.severity =
28129            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28130                enum_type: "MavSeverity",
28131                value: tmp as u32,
28132            })?;
28133        for v in &mut __struct.text {
28134            let val = buf.get_u8();
28135            *v = val;
28136        }
28137        __struct.id = buf.get_u16_le();
28138        __struct.chunk_seq = buf.get_u8();
28139        Ok(__struct)
28140    }
28141    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28142        let mut __tmp = BytesMut::new(bytes);
28143        #[allow(clippy::absurd_extreme_comparisons)]
28144        #[allow(unused_comparisons)]
28145        if __tmp.remaining() < Self::ENCODED_LEN {
28146            panic!(
28147                "buffer is too small (need {} bytes, but got {})",
28148                Self::ENCODED_LEN,
28149                __tmp.remaining(),
28150            )
28151        }
28152        __tmp.put_u8(self.severity as u8);
28153        for val in &self.text {
28154            __tmp.put_u8(*val);
28155        }
28156        __tmp.put_u16_le(self.id);
28157        __tmp.put_u8(self.chunk_seq);
28158        if matches!(version, MavlinkVersion::V2) {
28159            let len = __tmp.len();
28160            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28161        } else {
28162            __tmp.len()
28163        }
28164    }
28165}
28166#[doc = "id: 261"]
28167#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
28168#[derive(Debug, Clone, PartialEq)]
28169#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28170#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28171pub struct STORAGE_INFORMATION_DATA {
28172    #[doc = "Timestamp (time since system boot)."]
28173    pub time_boot_ms: u32,
28174    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28175    pub total_capacity: f32,
28176    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28177    pub used_capacity: f32,
28178    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28179    pub available_capacity: f32,
28180    #[doc = "Read speed."]
28181    pub read_speed: f32,
28182    #[doc = "Write speed."]
28183    pub write_speed: f32,
28184    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
28185    pub storage_id: u8,
28186    #[doc = "Number of storage devices"]
28187    pub storage_count: u8,
28188    #[doc = "Status of storage"]
28189    pub status: StorageStatus,
28190    #[doc = "Type of storage"]
28191    #[cfg_attr(feature = "serde", serde(default))]
28192    pub mavtype: StorageType,
28193    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
28194    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28195    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28196    pub name: [u8; 32],
28197    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
28198    #[cfg_attr(feature = "serde", serde(default))]
28199    pub storage_usage: StorageUsageFlag,
28200}
28201impl STORAGE_INFORMATION_DATA {
28202    pub const ENCODED_LEN: usize = 61usize;
28203    pub const DEFAULT: Self = Self {
28204        time_boot_ms: 0_u32,
28205        total_capacity: 0.0_f32,
28206        used_capacity: 0.0_f32,
28207        available_capacity: 0.0_f32,
28208        read_speed: 0.0_f32,
28209        write_speed: 0.0_f32,
28210        storage_id: 0_u8,
28211        storage_count: 0_u8,
28212        status: StorageStatus::DEFAULT,
28213        mavtype: StorageType::DEFAULT,
28214        name: [0_u8; 32usize],
28215        storage_usage: StorageUsageFlag::DEFAULT,
28216    };
28217    #[cfg(feature = "arbitrary")]
28218    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28219        use arbitrary::{Arbitrary, Unstructured};
28220        let mut buf = [0u8; 1024];
28221        rng.fill_bytes(&mut buf);
28222        let mut unstructured = Unstructured::new(&buf);
28223        Self::arbitrary(&mut unstructured).unwrap_or_default()
28224    }
28225}
28226impl Default for STORAGE_INFORMATION_DATA {
28227    fn default() -> Self {
28228        Self::DEFAULT.clone()
28229    }
28230}
28231impl MessageData for STORAGE_INFORMATION_DATA {
28232    type Message = MavMessage;
28233    const ID: u32 = 261u32;
28234    const NAME: &'static str = "STORAGE_INFORMATION";
28235    const EXTRA_CRC: u8 = 179u8;
28236    const ENCODED_LEN: usize = 61usize;
28237    fn deser(
28238        _version: MavlinkVersion,
28239        __input: &[u8],
28240    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28241        let avail_len = __input.len();
28242        let mut payload_buf = [0; Self::ENCODED_LEN];
28243        let mut buf = if avail_len < Self::ENCODED_LEN {
28244            payload_buf[0..avail_len].copy_from_slice(__input);
28245            Bytes::new(&payload_buf)
28246        } else {
28247            Bytes::new(__input)
28248        };
28249        let mut __struct = Self::default();
28250        __struct.time_boot_ms = buf.get_u32_le();
28251        __struct.total_capacity = buf.get_f32_le();
28252        __struct.used_capacity = buf.get_f32_le();
28253        __struct.available_capacity = buf.get_f32_le();
28254        __struct.read_speed = buf.get_f32_le();
28255        __struct.write_speed = buf.get_f32_le();
28256        __struct.storage_id = buf.get_u8();
28257        __struct.storage_count = buf.get_u8();
28258        let tmp = buf.get_u8();
28259        __struct.status =
28260            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28261                enum_type: "StorageStatus",
28262                value: tmp as u32,
28263            })?;
28264        let tmp = buf.get_u8();
28265        __struct.mavtype =
28266            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28267                enum_type: "StorageType",
28268                value: tmp as u32,
28269            })?;
28270        for v in &mut __struct.name {
28271            let val = buf.get_u8();
28272            *v = val;
28273        }
28274        let tmp = buf.get_u8();
28275        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
28276            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28277                flag_type: "StorageUsageFlag",
28278                value: tmp as u32,
28279            })?;
28280        Ok(__struct)
28281    }
28282    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28283        let mut __tmp = BytesMut::new(bytes);
28284        #[allow(clippy::absurd_extreme_comparisons)]
28285        #[allow(unused_comparisons)]
28286        if __tmp.remaining() < Self::ENCODED_LEN {
28287            panic!(
28288                "buffer is too small (need {} bytes, but got {})",
28289                Self::ENCODED_LEN,
28290                __tmp.remaining(),
28291            )
28292        }
28293        __tmp.put_u32_le(self.time_boot_ms);
28294        __tmp.put_f32_le(self.total_capacity);
28295        __tmp.put_f32_le(self.used_capacity);
28296        __tmp.put_f32_le(self.available_capacity);
28297        __tmp.put_f32_le(self.read_speed);
28298        __tmp.put_f32_le(self.write_speed);
28299        __tmp.put_u8(self.storage_id);
28300        __tmp.put_u8(self.storage_count);
28301        __tmp.put_u8(self.status as u8);
28302        __tmp.put_u8(self.mavtype as u8);
28303        for val in &self.name {
28304            __tmp.put_u8(*val);
28305        }
28306        __tmp.put_u8(self.storage_usage.bits());
28307        if matches!(version, MavlinkVersion::V2) {
28308            let len = __tmp.len();
28309            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28310        } else {
28311            __tmp.len()
28312        }
28313    }
28314}
28315#[doc = "id: 401"]
28316#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
28317#[derive(Debug, Clone, PartialEq)]
28318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28320pub struct SUPPORTED_TUNES_DATA {
28321    #[doc = "Bitfield of supported tune formats."]
28322    pub format: TuneFormat,
28323    #[doc = "System ID"]
28324    pub target_system: u8,
28325    #[doc = "Component ID"]
28326    pub target_component: u8,
28327}
28328impl SUPPORTED_TUNES_DATA {
28329    pub const ENCODED_LEN: usize = 6usize;
28330    pub const DEFAULT: Self = Self {
28331        format: TuneFormat::DEFAULT,
28332        target_system: 0_u8,
28333        target_component: 0_u8,
28334    };
28335    #[cfg(feature = "arbitrary")]
28336    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28337        use arbitrary::{Arbitrary, Unstructured};
28338        let mut buf = [0u8; 1024];
28339        rng.fill_bytes(&mut buf);
28340        let mut unstructured = Unstructured::new(&buf);
28341        Self::arbitrary(&mut unstructured).unwrap_or_default()
28342    }
28343}
28344impl Default for SUPPORTED_TUNES_DATA {
28345    fn default() -> Self {
28346        Self::DEFAULT.clone()
28347    }
28348}
28349impl MessageData for SUPPORTED_TUNES_DATA {
28350    type Message = MavMessage;
28351    const ID: u32 = 401u32;
28352    const NAME: &'static str = "SUPPORTED_TUNES";
28353    const EXTRA_CRC: u8 = 183u8;
28354    const ENCODED_LEN: usize = 6usize;
28355    fn deser(
28356        _version: MavlinkVersion,
28357        __input: &[u8],
28358    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28359        let avail_len = __input.len();
28360        let mut payload_buf = [0; Self::ENCODED_LEN];
28361        let mut buf = if avail_len < Self::ENCODED_LEN {
28362            payload_buf[0..avail_len].copy_from_slice(__input);
28363            Bytes::new(&payload_buf)
28364        } else {
28365            Bytes::new(__input)
28366        };
28367        let mut __struct = Self::default();
28368        let tmp = buf.get_u32_le();
28369        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
28370            ::mavlink_core::error::ParserError::InvalidEnum {
28371                enum_type: "TuneFormat",
28372                value: tmp as u32,
28373            },
28374        )?;
28375        __struct.target_system = buf.get_u8();
28376        __struct.target_component = buf.get_u8();
28377        Ok(__struct)
28378    }
28379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28380        let mut __tmp = BytesMut::new(bytes);
28381        #[allow(clippy::absurd_extreme_comparisons)]
28382        #[allow(unused_comparisons)]
28383        if __tmp.remaining() < Self::ENCODED_LEN {
28384            panic!(
28385                "buffer is too small (need {} bytes, but got {})",
28386                Self::ENCODED_LEN,
28387                __tmp.remaining(),
28388            )
28389        }
28390        __tmp.put_u32_le(self.format as u32);
28391        __tmp.put_u8(self.target_system);
28392        __tmp.put_u8(self.target_component);
28393        if matches!(version, MavlinkVersion::V2) {
28394            let len = __tmp.len();
28395            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28396        } else {
28397            __tmp.len()
28398        }
28399    }
28400}
28401#[doc = "id: 2"]
28402#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
28403#[derive(Debug, Clone, PartialEq)]
28404#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28405#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28406pub struct SYSTEM_TIME_DATA {
28407    #[doc = "Timestamp (UNIX epoch time)."]
28408    pub time_unix_usec: u64,
28409    #[doc = "Timestamp (time since system boot)."]
28410    pub time_boot_ms: u32,
28411}
28412impl SYSTEM_TIME_DATA {
28413    pub const ENCODED_LEN: usize = 12usize;
28414    pub const DEFAULT: Self = Self {
28415        time_unix_usec: 0_u64,
28416        time_boot_ms: 0_u32,
28417    };
28418    #[cfg(feature = "arbitrary")]
28419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28420        use arbitrary::{Arbitrary, Unstructured};
28421        let mut buf = [0u8; 1024];
28422        rng.fill_bytes(&mut buf);
28423        let mut unstructured = Unstructured::new(&buf);
28424        Self::arbitrary(&mut unstructured).unwrap_or_default()
28425    }
28426}
28427impl Default for SYSTEM_TIME_DATA {
28428    fn default() -> Self {
28429        Self::DEFAULT.clone()
28430    }
28431}
28432impl MessageData for SYSTEM_TIME_DATA {
28433    type Message = MavMessage;
28434    const ID: u32 = 2u32;
28435    const NAME: &'static str = "SYSTEM_TIME";
28436    const EXTRA_CRC: u8 = 137u8;
28437    const ENCODED_LEN: usize = 12usize;
28438    fn deser(
28439        _version: MavlinkVersion,
28440        __input: &[u8],
28441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28442        let avail_len = __input.len();
28443        let mut payload_buf = [0; Self::ENCODED_LEN];
28444        let mut buf = if avail_len < Self::ENCODED_LEN {
28445            payload_buf[0..avail_len].copy_from_slice(__input);
28446            Bytes::new(&payload_buf)
28447        } else {
28448            Bytes::new(__input)
28449        };
28450        let mut __struct = Self::default();
28451        __struct.time_unix_usec = buf.get_u64_le();
28452        __struct.time_boot_ms = buf.get_u32_le();
28453        Ok(__struct)
28454    }
28455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28456        let mut __tmp = BytesMut::new(bytes);
28457        #[allow(clippy::absurd_extreme_comparisons)]
28458        #[allow(unused_comparisons)]
28459        if __tmp.remaining() < Self::ENCODED_LEN {
28460            panic!(
28461                "buffer is too small (need {} bytes, but got {})",
28462                Self::ENCODED_LEN,
28463                __tmp.remaining(),
28464            )
28465        }
28466        __tmp.put_u64_le(self.time_unix_usec);
28467        __tmp.put_u32_le(self.time_boot_ms);
28468        if matches!(version, MavlinkVersion::V2) {
28469            let len = __tmp.len();
28470            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28471        } else {
28472            __tmp.len()
28473        }
28474    }
28475}
28476#[doc = "id: 1"]
28477#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
28478#[derive(Debug, Clone, PartialEq)]
28479#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28480#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28481pub struct SYS_STATUS_DATA {
28482    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28483    pub onboard_control_sensors_present: MavSysStatusSensor,
28484    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28485    pub onboard_control_sensors_enabled: MavSysStatusSensor,
28486    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28487    pub onboard_control_sensors_health: MavSysStatusSensor,
28488    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
28489    pub load: u16,
28490    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
28491    pub voltage_battery: u16,
28492    #[doc = "Battery current, -1: Current not sent by autopilot"]
28493    pub current_battery: i16,
28494    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28495    pub drop_rate_comm: u16,
28496    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28497    pub errors_comm: u16,
28498    #[doc = "Autopilot-specific errors"]
28499    pub errors_count1: u16,
28500    #[doc = "Autopilot-specific errors"]
28501    pub errors_count2: u16,
28502    #[doc = "Autopilot-specific errors"]
28503    pub errors_count3: u16,
28504    #[doc = "Autopilot-specific errors"]
28505    pub errors_count4: u16,
28506    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
28507    pub battery_remaining: i8,
28508    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28509    #[cfg_attr(feature = "serde", serde(default))]
28510    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
28511    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28512    #[cfg_attr(feature = "serde", serde(default))]
28513    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
28514    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28515    #[cfg_attr(feature = "serde", serde(default))]
28516    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
28517}
28518impl SYS_STATUS_DATA {
28519    pub const ENCODED_LEN: usize = 43usize;
28520    pub const DEFAULT: Self = Self {
28521        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
28522        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
28523        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
28524        load: 0_u16,
28525        voltage_battery: 0_u16,
28526        current_battery: 0_i16,
28527        drop_rate_comm: 0_u16,
28528        errors_comm: 0_u16,
28529        errors_count1: 0_u16,
28530        errors_count2: 0_u16,
28531        errors_count3: 0_u16,
28532        errors_count4: 0_u16,
28533        battery_remaining: 0_i8,
28534        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
28535        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
28536        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
28537    };
28538    #[cfg(feature = "arbitrary")]
28539    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28540        use arbitrary::{Arbitrary, Unstructured};
28541        let mut buf = [0u8; 1024];
28542        rng.fill_bytes(&mut buf);
28543        let mut unstructured = Unstructured::new(&buf);
28544        Self::arbitrary(&mut unstructured).unwrap_or_default()
28545    }
28546}
28547impl Default for SYS_STATUS_DATA {
28548    fn default() -> Self {
28549        Self::DEFAULT.clone()
28550    }
28551}
28552impl MessageData for SYS_STATUS_DATA {
28553    type Message = MavMessage;
28554    const ID: u32 = 1u32;
28555    const NAME: &'static str = "SYS_STATUS";
28556    const EXTRA_CRC: u8 = 124u8;
28557    const ENCODED_LEN: usize = 43usize;
28558    fn deser(
28559        _version: MavlinkVersion,
28560        __input: &[u8],
28561    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28562        let avail_len = __input.len();
28563        let mut payload_buf = [0; Self::ENCODED_LEN];
28564        let mut buf = if avail_len < Self::ENCODED_LEN {
28565            payload_buf[0..avail_len].copy_from_slice(__input);
28566            Bytes::new(&payload_buf)
28567        } else {
28568            Bytes::new(__input)
28569        };
28570        let mut __struct = Self::default();
28571        let tmp = buf.get_u32_le();
28572        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
28573            tmp & MavSysStatusSensor::all().bits(),
28574        )
28575        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28576            flag_type: "MavSysStatusSensor",
28577            value: tmp as u32,
28578        })?;
28579        let tmp = buf.get_u32_le();
28580        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
28581            tmp & MavSysStatusSensor::all().bits(),
28582        )
28583        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28584            flag_type: "MavSysStatusSensor",
28585            value: tmp as u32,
28586        })?;
28587        let tmp = buf.get_u32_le();
28588        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
28589            tmp & MavSysStatusSensor::all().bits(),
28590        )
28591        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28592            flag_type: "MavSysStatusSensor",
28593            value: tmp as u32,
28594        })?;
28595        __struct.load = buf.get_u16_le();
28596        __struct.voltage_battery = buf.get_u16_le();
28597        __struct.current_battery = buf.get_i16_le();
28598        __struct.drop_rate_comm = buf.get_u16_le();
28599        __struct.errors_comm = buf.get_u16_le();
28600        __struct.errors_count1 = buf.get_u16_le();
28601        __struct.errors_count2 = buf.get_u16_le();
28602        __struct.errors_count3 = buf.get_u16_le();
28603        __struct.errors_count4 = buf.get_u16_le();
28604        __struct.battery_remaining = buf.get_i8();
28605        let tmp = buf.get_u32_le();
28606        __struct.onboard_control_sensors_present_extended =
28607            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28608                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28609                flag_type: "MavSysStatusSensorExtended",
28610                value: tmp as u32,
28611            })?;
28612        let tmp = buf.get_u32_le();
28613        __struct.onboard_control_sensors_enabled_extended =
28614            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28615                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28616                flag_type: "MavSysStatusSensorExtended",
28617                value: tmp as u32,
28618            })?;
28619        let tmp = buf.get_u32_le();
28620        __struct.onboard_control_sensors_health_extended =
28621            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28622                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28623                flag_type: "MavSysStatusSensorExtended",
28624                value: tmp as u32,
28625            })?;
28626        Ok(__struct)
28627    }
28628    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28629        let mut __tmp = BytesMut::new(bytes);
28630        #[allow(clippy::absurd_extreme_comparisons)]
28631        #[allow(unused_comparisons)]
28632        if __tmp.remaining() < Self::ENCODED_LEN {
28633            panic!(
28634                "buffer is too small (need {} bytes, but got {})",
28635                Self::ENCODED_LEN,
28636                __tmp.remaining(),
28637            )
28638        }
28639        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
28640        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
28641        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
28642        __tmp.put_u16_le(self.load);
28643        __tmp.put_u16_le(self.voltage_battery);
28644        __tmp.put_i16_le(self.current_battery);
28645        __tmp.put_u16_le(self.drop_rate_comm);
28646        __tmp.put_u16_le(self.errors_comm);
28647        __tmp.put_u16_le(self.errors_count1);
28648        __tmp.put_u16_le(self.errors_count2);
28649        __tmp.put_u16_le(self.errors_count3);
28650        __tmp.put_u16_le(self.errors_count4);
28651        __tmp.put_i8(self.battery_remaining);
28652        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
28653        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
28654        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
28655        if matches!(version, MavlinkVersion::V2) {
28656            let len = __tmp.len();
28657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28658        } else {
28659            __tmp.len()
28660        }
28661    }
28662}
28663#[doc = "id: 135"]
28664#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
28665#[derive(Debug, Clone, PartialEq)]
28666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28668pub struct TERRAIN_CHECK_DATA {
28669    #[doc = "Latitude"]
28670    pub lat: i32,
28671    #[doc = "Longitude"]
28672    pub lon: i32,
28673}
28674impl TERRAIN_CHECK_DATA {
28675    pub const ENCODED_LEN: usize = 8usize;
28676    pub const DEFAULT: Self = Self {
28677        lat: 0_i32,
28678        lon: 0_i32,
28679    };
28680    #[cfg(feature = "arbitrary")]
28681    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28682        use arbitrary::{Arbitrary, Unstructured};
28683        let mut buf = [0u8; 1024];
28684        rng.fill_bytes(&mut buf);
28685        let mut unstructured = Unstructured::new(&buf);
28686        Self::arbitrary(&mut unstructured).unwrap_or_default()
28687    }
28688}
28689impl Default for TERRAIN_CHECK_DATA {
28690    fn default() -> Self {
28691        Self::DEFAULT.clone()
28692    }
28693}
28694impl MessageData for TERRAIN_CHECK_DATA {
28695    type Message = MavMessage;
28696    const ID: u32 = 135u32;
28697    const NAME: &'static str = "TERRAIN_CHECK";
28698    const EXTRA_CRC: u8 = 203u8;
28699    const ENCODED_LEN: usize = 8usize;
28700    fn deser(
28701        _version: MavlinkVersion,
28702        __input: &[u8],
28703    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28704        let avail_len = __input.len();
28705        let mut payload_buf = [0; Self::ENCODED_LEN];
28706        let mut buf = if avail_len < Self::ENCODED_LEN {
28707            payload_buf[0..avail_len].copy_from_slice(__input);
28708            Bytes::new(&payload_buf)
28709        } else {
28710            Bytes::new(__input)
28711        };
28712        let mut __struct = Self::default();
28713        __struct.lat = buf.get_i32_le();
28714        __struct.lon = buf.get_i32_le();
28715        Ok(__struct)
28716    }
28717    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28718        let mut __tmp = BytesMut::new(bytes);
28719        #[allow(clippy::absurd_extreme_comparisons)]
28720        #[allow(unused_comparisons)]
28721        if __tmp.remaining() < Self::ENCODED_LEN {
28722            panic!(
28723                "buffer is too small (need {} bytes, but got {})",
28724                Self::ENCODED_LEN,
28725                __tmp.remaining(),
28726            )
28727        }
28728        __tmp.put_i32_le(self.lat);
28729        __tmp.put_i32_le(self.lon);
28730        if matches!(version, MavlinkVersion::V2) {
28731            let len = __tmp.len();
28732            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28733        } else {
28734            __tmp.len()
28735        }
28736    }
28737}
28738#[doc = "id: 134"]
28739#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28740#[derive(Debug, Clone, PartialEq)]
28741#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28742#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28743pub struct TERRAIN_DATA_DATA {
28744    #[doc = "Latitude of SW corner of first grid"]
28745    pub lat: i32,
28746    #[doc = "Longitude of SW corner of first grid"]
28747    pub lon: i32,
28748    #[doc = "Grid spacing"]
28749    pub grid_spacing: u16,
28750    #[doc = "Terrain data MSL"]
28751    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28752    pub data: [i16; 16],
28753    #[doc = "bit within the terrain request mask"]
28754    pub gridbit: u8,
28755}
28756impl TERRAIN_DATA_DATA {
28757    pub const ENCODED_LEN: usize = 43usize;
28758    pub const DEFAULT: Self = Self {
28759        lat: 0_i32,
28760        lon: 0_i32,
28761        grid_spacing: 0_u16,
28762        data: [0_i16; 16usize],
28763        gridbit: 0_u8,
28764    };
28765    #[cfg(feature = "arbitrary")]
28766    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28767        use arbitrary::{Arbitrary, Unstructured};
28768        let mut buf = [0u8; 1024];
28769        rng.fill_bytes(&mut buf);
28770        let mut unstructured = Unstructured::new(&buf);
28771        Self::arbitrary(&mut unstructured).unwrap_or_default()
28772    }
28773}
28774impl Default for TERRAIN_DATA_DATA {
28775    fn default() -> Self {
28776        Self::DEFAULT.clone()
28777    }
28778}
28779impl MessageData for TERRAIN_DATA_DATA {
28780    type Message = MavMessage;
28781    const ID: u32 = 134u32;
28782    const NAME: &'static str = "TERRAIN_DATA";
28783    const EXTRA_CRC: u8 = 229u8;
28784    const ENCODED_LEN: usize = 43usize;
28785    fn deser(
28786        _version: MavlinkVersion,
28787        __input: &[u8],
28788    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28789        let avail_len = __input.len();
28790        let mut payload_buf = [0; Self::ENCODED_LEN];
28791        let mut buf = if avail_len < Self::ENCODED_LEN {
28792            payload_buf[0..avail_len].copy_from_slice(__input);
28793            Bytes::new(&payload_buf)
28794        } else {
28795            Bytes::new(__input)
28796        };
28797        let mut __struct = Self::default();
28798        __struct.lat = buf.get_i32_le();
28799        __struct.lon = buf.get_i32_le();
28800        __struct.grid_spacing = buf.get_u16_le();
28801        for v in &mut __struct.data {
28802            let val = buf.get_i16_le();
28803            *v = val;
28804        }
28805        __struct.gridbit = buf.get_u8();
28806        Ok(__struct)
28807    }
28808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28809        let mut __tmp = BytesMut::new(bytes);
28810        #[allow(clippy::absurd_extreme_comparisons)]
28811        #[allow(unused_comparisons)]
28812        if __tmp.remaining() < Self::ENCODED_LEN {
28813            panic!(
28814                "buffer is too small (need {} bytes, but got {})",
28815                Self::ENCODED_LEN,
28816                __tmp.remaining(),
28817            )
28818        }
28819        __tmp.put_i32_le(self.lat);
28820        __tmp.put_i32_le(self.lon);
28821        __tmp.put_u16_le(self.grid_spacing);
28822        for val in &self.data {
28823            __tmp.put_i16_le(*val);
28824        }
28825        __tmp.put_u8(self.gridbit);
28826        if matches!(version, MavlinkVersion::V2) {
28827            let len = __tmp.len();
28828            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28829        } else {
28830            __tmp.len()
28831        }
28832    }
28833}
28834#[doc = "id: 136"]
28835#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28836#[derive(Debug, Clone, PartialEq)]
28837#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28838#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28839pub struct TERRAIN_REPORT_DATA {
28840    #[doc = "Latitude"]
28841    pub lat: i32,
28842    #[doc = "Longitude"]
28843    pub lon: i32,
28844    #[doc = "Terrain height MSL"]
28845    pub terrain_height: f32,
28846    #[doc = "Current vehicle height above lat/lon terrain height"]
28847    pub current_height: f32,
28848    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
28849    pub spacing: u16,
28850    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
28851    pub pending: u16,
28852    #[doc = "Number of 4x4 terrain blocks in memory"]
28853    pub loaded: u16,
28854}
28855impl TERRAIN_REPORT_DATA {
28856    pub const ENCODED_LEN: usize = 22usize;
28857    pub const DEFAULT: Self = Self {
28858        lat: 0_i32,
28859        lon: 0_i32,
28860        terrain_height: 0.0_f32,
28861        current_height: 0.0_f32,
28862        spacing: 0_u16,
28863        pending: 0_u16,
28864        loaded: 0_u16,
28865    };
28866    #[cfg(feature = "arbitrary")]
28867    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28868        use arbitrary::{Arbitrary, Unstructured};
28869        let mut buf = [0u8; 1024];
28870        rng.fill_bytes(&mut buf);
28871        let mut unstructured = Unstructured::new(&buf);
28872        Self::arbitrary(&mut unstructured).unwrap_or_default()
28873    }
28874}
28875impl Default for TERRAIN_REPORT_DATA {
28876    fn default() -> Self {
28877        Self::DEFAULT.clone()
28878    }
28879}
28880impl MessageData for TERRAIN_REPORT_DATA {
28881    type Message = MavMessage;
28882    const ID: u32 = 136u32;
28883    const NAME: &'static str = "TERRAIN_REPORT";
28884    const EXTRA_CRC: u8 = 1u8;
28885    const ENCODED_LEN: usize = 22usize;
28886    fn deser(
28887        _version: MavlinkVersion,
28888        __input: &[u8],
28889    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28890        let avail_len = __input.len();
28891        let mut payload_buf = [0; Self::ENCODED_LEN];
28892        let mut buf = if avail_len < Self::ENCODED_LEN {
28893            payload_buf[0..avail_len].copy_from_slice(__input);
28894            Bytes::new(&payload_buf)
28895        } else {
28896            Bytes::new(__input)
28897        };
28898        let mut __struct = Self::default();
28899        __struct.lat = buf.get_i32_le();
28900        __struct.lon = buf.get_i32_le();
28901        __struct.terrain_height = buf.get_f32_le();
28902        __struct.current_height = buf.get_f32_le();
28903        __struct.spacing = buf.get_u16_le();
28904        __struct.pending = buf.get_u16_le();
28905        __struct.loaded = buf.get_u16_le();
28906        Ok(__struct)
28907    }
28908    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28909        let mut __tmp = BytesMut::new(bytes);
28910        #[allow(clippy::absurd_extreme_comparisons)]
28911        #[allow(unused_comparisons)]
28912        if __tmp.remaining() < Self::ENCODED_LEN {
28913            panic!(
28914                "buffer is too small (need {} bytes, but got {})",
28915                Self::ENCODED_LEN,
28916                __tmp.remaining(),
28917            )
28918        }
28919        __tmp.put_i32_le(self.lat);
28920        __tmp.put_i32_le(self.lon);
28921        __tmp.put_f32_le(self.terrain_height);
28922        __tmp.put_f32_le(self.current_height);
28923        __tmp.put_u16_le(self.spacing);
28924        __tmp.put_u16_le(self.pending);
28925        __tmp.put_u16_le(self.loaded);
28926        if matches!(version, MavlinkVersion::V2) {
28927            let len = __tmp.len();
28928            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28929        } else {
28930            __tmp.len()
28931        }
28932    }
28933}
28934#[doc = "id: 133"]
28935#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28936#[derive(Debug, Clone, PartialEq)]
28937#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28938#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28939pub struct TERRAIN_REQUEST_DATA {
28940    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
28941    pub mask: u64,
28942    #[doc = "Latitude of SW corner of first grid"]
28943    pub lat: i32,
28944    #[doc = "Longitude of SW corner of first grid"]
28945    pub lon: i32,
28946    #[doc = "Grid spacing"]
28947    pub grid_spacing: u16,
28948}
28949impl TERRAIN_REQUEST_DATA {
28950    pub const ENCODED_LEN: usize = 18usize;
28951    pub const DEFAULT: Self = Self {
28952        mask: 0_u64,
28953        lat: 0_i32,
28954        lon: 0_i32,
28955        grid_spacing: 0_u16,
28956    };
28957    #[cfg(feature = "arbitrary")]
28958    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28959        use arbitrary::{Arbitrary, Unstructured};
28960        let mut buf = [0u8; 1024];
28961        rng.fill_bytes(&mut buf);
28962        let mut unstructured = Unstructured::new(&buf);
28963        Self::arbitrary(&mut unstructured).unwrap_or_default()
28964    }
28965}
28966impl Default for TERRAIN_REQUEST_DATA {
28967    fn default() -> Self {
28968        Self::DEFAULT.clone()
28969    }
28970}
28971impl MessageData for TERRAIN_REQUEST_DATA {
28972    type Message = MavMessage;
28973    const ID: u32 = 133u32;
28974    const NAME: &'static str = "TERRAIN_REQUEST";
28975    const EXTRA_CRC: u8 = 6u8;
28976    const ENCODED_LEN: usize = 18usize;
28977    fn deser(
28978        _version: MavlinkVersion,
28979        __input: &[u8],
28980    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28981        let avail_len = __input.len();
28982        let mut payload_buf = [0; Self::ENCODED_LEN];
28983        let mut buf = if avail_len < Self::ENCODED_LEN {
28984            payload_buf[0..avail_len].copy_from_slice(__input);
28985            Bytes::new(&payload_buf)
28986        } else {
28987            Bytes::new(__input)
28988        };
28989        let mut __struct = Self::default();
28990        __struct.mask = buf.get_u64_le();
28991        __struct.lat = buf.get_i32_le();
28992        __struct.lon = buf.get_i32_le();
28993        __struct.grid_spacing = buf.get_u16_le();
28994        Ok(__struct)
28995    }
28996    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28997        let mut __tmp = BytesMut::new(bytes);
28998        #[allow(clippy::absurd_extreme_comparisons)]
28999        #[allow(unused_comparisons)]
29000        if __tmp.remaining() < Self::ENCODED_LEN {
29001            panic!(
29002                "buffer is too small (need {} bytes, but got {})",
29003                Self::ENCODED_LEN,
29004                __tmp.remaining(),
29005            )
29006        }
29007        __tmp.put_u64_le(self.mask);
29008        __tmp.put_i32_le(self.lat);
29009        __tmp.put_i32_le(self.lon);
29010        __tmp.put_u16_le(self.grid_spacing);
29011        if matches!(version, MavlinkVersion::V2) {
29012            let len = __tmp.len();
29013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29014        } else {
29015            __tmp.len()
29016        }
29017    }
29018}
29019#[doc = "id: 111"]
29020#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
29021#[derive(Debug, Clone, PartialEq)]
29022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29024pub struct TIMESYNC_DATA {
29025    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
29026    pub tc1: i64,
29027    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
29028    pub ts1: i64,
29029    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
29030    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29031    pub target_system: u8,
29032    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
29033    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
29034    pub target_component: u8,
29035}
29036impl TIMESYNC_DATA {
29037    pub const ENCODED_LEN: usize = 18usize;
29038    pub const DEFAULT: Self = Self {
29039        tc1: 0_i64,
29040        ts1: 0_i64,
29041        target_system: 0_u8,
29042        target_component: 0_u8,
29043    };
29044    #[cfg(feature = "arbitrary")]
29045    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29046        use arbitrary::{Arbitrary, Unstructured};
29047        let mut buf = [0u8; 1024];
29048        rng.fill_bytes(&mut buf);
29049        let mut unstructured = Unstructured::new(&buf);
29050        Self::arbitrary(&mut unstructured).unwrap_or_default()
29051    }
29052}
29053impl Default for TIMESYNC_DATA {
29054    fn default() -> Self {
29055        Self::DEFAULT.clone()
29056    }
29057}
29058impl MessageData for TIMESYNC_DATA {
29059    type Message = MavMessage;
29060    const ID: u32 = 111u32;
29061    const NAME: &'static str = "TIMESYNC";
29062    const EXTRA_CRC: u8 = 34u8;
29063    const ENCODED_LEN: usize = 18usize;
29064    fn deser(
29065        _version: MavlinkVersion,
29066        __input: &[u8],
29067    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29068        let avail_len = __input.len();
29069        let mut payload_buf = [0; Self::ENCODED_LEN];
29070        let mut buf = if avail_len < Self::ENCODED_LEN {
29071            payload_buf[0..avail_len].copy_from_slice(__input);
29072            Bytes::new(&payload_buf)
29073        } else {
29074            Bytes::new(__input)
29075        };
29076        let mut __struct = Self::default();
29077        __struct.tc1 = buf.get_i64_le();
29078        __struct.ts1 = buf.get_i64_le();
29079        __struct.target_system = buf.get_u8();
29080        __struct.target_component = buf.get_u8();
29081        Ok(__struct)
29082    }
29083    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29084        let mut __tmp = BytesMut::new(bytes);
29085        #[allow(clippy::absurd_extreme_comparisons)]
29086        #[allow(unused_comparisons)]
29087        if __tmp.remaining() < Self::ENCODED_LEN {
29088            panic!(
29089                "buffer is too small (need {} bytes, but got {})",
29090                Self::ENCODED_LEN,
29091                __tmp.remaining(),
29092            )
29093        }
29094        __tmp.put_i64_le(self.tc1);
29095        __tmp.put_i64_le(self.ts1);
29096        __tmp.put_u8(self.target_system);
29097        __tmp.put_u8(self.target_component);
29098        if matches!(version, MavlinkVersion::V2) {
29099            let len = __tmp.len();
29100            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29101        } else {
29102            __tmp.len()
29103        }
29104    }
29105}
29106#[doc = "id: 380"]
29107#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
29108#[derive(Debug, Clone, PartialEq)]
29109#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29110#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29111pub struct TIME_ESTIMATE_TO_TARGET_DATA {
29112    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
29113    pub safe_return: i32,
29114    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
29115    pub land: i32,
29116    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
29117    pub mission_next_item: i32,
29118    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
29119    pub mission_end: i32,
29120    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
29121    pub commanded_action: i32,
29122}
29123impl TIME_ESTIMATE_TO_TARGET_DATA {
29124    pub const ENCODED_LEN: usize = 20usize;
29125    pub const DEFAULT: Self = Self {
29126        safe_return: 0_i32,
29127        land: 0_i32,
29128        mission_next_item: 0_i32,
29129        mission_end: 0_i32,
29130        commanded_action: 0_i32,
29131    };
29132    #[cfg(feature = "arbitrary")]
29133    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29134        use arbitrary::{Arbitrary, Unstructured};
29135        let mut buf = [0u8; 1024];
29136        rng.fill_bytes(&mut buf);
29137        let mut unstructured = Unstructured::new(&buf);
29138        Self::arbitrary(&mut unstructured).unwrap_or_default()
29139    }
29140}
29141impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
29142    fn default() -> Self {
29143        Self::DEFAULT.clone()
29144    }
29145}
29146impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
29147    type Message = MavMessage;
29148    const ID: u32 = 380u32;
29149    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
29150    const EXTRA_CRC: u8 = 232u8;
29151    const ENCODED_LEN: usize = 20usize;
29152    fn deser(
29153        _version: MavlinkVersion,
29154        __input: &[u8],
29155    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29156        let avail_len = __input.len();
29157        let mut payload_buf = [0; Self::ENCODED_LEN];
29158        let mut buf = if avail_len < Self::ENCODED_LEN {
29159            payload_buf[0..avail_len].copy_from_slice(__input);
29160            Bytes::new(&payload_buf)
29161        } else {
29162            Bytes::new(__input)
29163        };
29164        let mut __struct = Self::default();
29165        __struct.safe_return = buf.get_i32_le();
29166        __struct.land = buf.get_i32_le();
29167        __struct.mission_next_item = buf.get_i32_le();
29168        __struct.mission_end = buf.get_i32_le();
29169        __struct.commanded_action = buf.get_i32_le();
29170        Ok(__struct)
29171    }
29172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29173        let mut __tmp = BytesMut::new(bytes);
29174        #[allow(clippy::absurd_extreme_comparisons)]
29175        #[allow(unused_comparisons)]
29176        if __tmp.remaining() < Self::ENCODED_LEN {
29177            panic!(
29178                "buffer is too small (need {} bytes, but got {})",
29179                Self::ENCODED_LEN,
29180                __tmp.remaining(),
29181            )
29182        }
29183        __tmp.put_i32_le(self.safe_return);
29184        __tmp.put_i32_le(self.land);
29185        __tmp.put_i32_le(self.mission_next_item);
29186        __tmp.put_i32_le(self.mission_end);
29187        __tmp.put_i32_le(self.commanded_action);
29188        if matches!(version, MavlinkVersion::V2) {
29189            let len = __tmp.len();
29190            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29191        } else {
29192            __tmp.len()
29193        }
29194    }
29195}
29196#[doc = "id: 333"]
29197#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
29198#[derive(Debug, Clone, PartialEq)]
29199#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29200#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29201pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29202    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29203    pub time_usec: u64,
29204    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
29205    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29206    pub pos_x: [f32; 5],
29207    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
29208    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29209    pub pos_y: [f32; 5],
29210    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
29211    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29212    pub pos_z: [f32; 5],
29213    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
29214    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29215    pub delta: [f32; 5],
29216    #[doc = "Yaw. Set to NaN for unchanged"]
29217    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29218    pub pos_yaw: [f32; 5],
29219    #[doc = "Number of valid control points (up-to 5 points are possible)"]
29220    pub valid_points: u8,
29221}
29222impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29223    pub const ENCODED_LEN: usize = 109usize;
29224    pub const DEFAULT: Self = Self {
29225        time_usec: 0_u64,
29226        pos_x: [0.0_f32; 5usize],
29227        pos_y: [0.0_f32; 5usize],
29228        pos_z: [0.0_f32; 5usize],
29229        delta: [0.0_f32; 5usize],
29230        pos_yaw: [0.0_f32; 5usize],
29231        valid_points: 0_u8,
29232    };
29233    #[cfg(feature = "arbitrary")]
29234    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29235        use arbitrary::{Arbitrary, Unstructured};
29236        let mut buf = [0u8; 1024];
29237        rng.fill_bytes(&mut buf);
29238        let mut unstructured = Unstructured::new(&buf);
29239        Self::arbitrary(&mut unstructured).unwrap_or_default()
29240    }
29241}
29242impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29243    fn default() -> Self {
29244        Self::DEFAULT.clone()
29245    }
29246}
29247impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29248    type Message = MavMessage;
29249    const ID: u32 = 333u32;
29250    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
29251    const EXTRA_CRC: u8 = 231u8;
29252    const ENCODED_LEN: usize = 109usize;
29253    fn deser(
29254        _version: MavlinkVersion,
29255        __input: &[u8],
29256    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29257        let avail_len = __input.len();
29258        let mut payload_buf = [0; Self::ENCODED_LEN];
29259        let mut buf = if avail_len < Self::ENCODED_LEN {
29260            payload_buf[0..avail_len].copy_from_slice(__input);
29261            Bytes::new(&payload_buf)
29262        } else {
29263            Bytes::new(__input)
29264        };
29265        let mut __struct = Self::default();
29266        __struct.time_usec = buf.get_u64_le();
29267        for v in &mut __struct.pos_x {
29268            let val = buf.get_f32_le();
29269            *v = val;
29270        }
29271        for v in &mut __struct.pos_y {
29272            let val = buf.get_f32_le();
29273            *v = val;
29274        }
29275        for v in &mut __struct.pos_z {
29276            let val = buf.get_f32_le();
29277            *v = val;
29278        }
29279        for v in &mut __struct.delta {
29280            let val = buf.get_f32_le();
29281            *v = val;
29282        }
29283        for v in &mut __struct.pos_yaw {
29284            let val = buf.get_f32_le();
29285            *v = val;
29286        }
29287        __struct.valid_points = buf.get_u8();
29288        Ok(__struct)
29289    }
29290    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29291        let mut __tmp = BytesMut::new(bytes);
29292        #[allow(clippy::absurd_extreme_comparisons)]
29293        #[allow(unused_comparisons)]
29294        if __tmp.remaining() < Self::ENCODED_LEN {
29295            panic!(
29296                "buffer is too small (need {} bytes, but got {})",
29297                Self::ENCODED_LEN,
29298                __tmp.remaining(),
29299            )
29300        }
29301        __tmp.put_u64_le(self.time_usec);
29302        for val in &self.pos_x {
29303            __tmp.put_f32_le(*val);
29304        }
29305        for val in &self.pos_y {
29306            __tmp.put_f32_le(*val);
29307        }
29308        for val in &self.pos_z {
29309            __tmp.put_f32_le(*val);
29310        }
29311        for val in &self.delta {
29312            __tmp.put_f32_le(*val);
29313        }
29314        for val in &self.pos_yaw {
29315            __tmp.put_f32_le(*val);
29316        }
29317        __tmp.put_u8(self.valid_points);
29318        if matches!(version, MavlinkVersion::V2) {
29319            let len = __tmp.len();
29320            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29321        } else {
29322            __tmp.len()
29323        }
29324    }
29325}
29326#[doc = "id: 332"]
29327#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
29328#[derive(Debug, Clone, PartialEq)]
29329#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29330#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29331pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29332    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29333    pub time_usec: u64,
29334    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
29335    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29336    pub pos_x: [f32; 5],
29337    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
29338    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29339    pub pos_y: [f32; 5],
29340    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
29341    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29342    pub pos_z: [f32; 5],
29343    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
29344    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29345    pub vel_x: [f32; 5],
29346    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
29347    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29348    pub vel_y: [f32; 5],
29349    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
29350    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29351    pub vel_z: [f32; 5],
29352    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
29353    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29354    pub acc_x: [f32; 5],
29355    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
29356    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29357    pub acc_y: [f32; 5],
29358    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
29359    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29360    pub acc_z: [f32; 5],
29361    #[doc = "Yaw angle, set to NaN if not being used"]
29362    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29363    pub pos_yaw: [f32; 5],
29364    #[doc = "Yaw rate, set to NaN if not being used"]
29365    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29366    pub vel_yaw: [f32; 5],
29367    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
29368    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29369    pub command: [u16; 5],
29370    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
29371    pub valid_points: u8,
29372}
29373impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29374    pub const ENCODED_LEN: usize = 239usize;
29375    pub const DEFAULT: Self = Self {
29376        time_usec: 0_u64,
29377        pos_x: [0.0_f32; 5usize],
29378        pos_y: [0.0_f32; 5usize],
29379        pos_z: [0.0_f32; 5usize],
29380        vel_x: [0.0_f32; 5usize],
29381        vel_y: [0.0_f32; 5usize],
29382        vel_z: [0.0_f32; 5usize],
29383        acc_x: [0.0_f32; 5usize],
29384        acc_y: [0.0_f32; 5usize],
29385        acc_z: [0.0_f32; 5usize],
29386        pos_yaw: [0.0_f32; 5usize],
29387        vel_yaw: [0.0_f32; 5usize],
29388        command: [0_u16; 5usize],
29389        valid_points: 0_u8,
29390    };
29391    #[cfg(feature = "arbitrary")]
29392    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29393        use arbitrary::{Arbitrary, Unstructured};
29394        let mut buf = [0u8; 1024];
29395        rng.fill_bytes(&mut buf);
29396        let mut unstructured = Unstructured::new(&buf);
29397        Self::arbitrary(&mut unstructured).unwrap_or_default()
29398    }
29399}
29400impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29401    fn default() -> Self {
29402        Self::DEFAULT.clone()
29403    }
29404}
29405impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29406    type Message = MavMessage;
29407    const ID: u32 = 332u32;
29408    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
29409    const EXTRA_CRC: u8 = 236u8;
29410    const ENCODED_LEN: usize = 239usize;
29411    fn deser(
29412        _version: MavlinkVersion,
29413        __input: &[u8],
29414    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29415        let avail_len = __input.len();
29416        let mut payload_buf = [0; Self::ENCODED_LEN];
29417        let mut buf = if avail_len < Self::ENCODED_LEN {
29418            payload_buf[0..avail_len].copy_from_slice(__input);
29419            Bytes::new(&payload_buf)
29420        } else {
29421            Bytes::new(__input)
29422        };
29423        let mut __struct = Self::default();
29424        __struct.time_usec = buf.get_u64_le();
29425        for v in &mut __struct.pos_x {
29426            let val = buf.get_f32_le();
29427            *v = val;
29428        }
29429        for v in &mut __struct.pos_y {
29430            let val = buf.get_f32_le();
29431            *v = val;
29432        }
29433        for v in &mut __struct.pos_z {
29434            let val = buf.get_f32_le();
29435            *v = val;
29436        }
29437        for v in &mut __struct.vel_x {
29438            let val = buf.get_f32_le();
29439            *v = val;
29440        }
29441        for v in &mut __struct.vel_y {
29442            let val = buf.get_f32_le();
29443            *v = val;
29444        }
29445        for v in &mut __struct.vel_z {
29446            let val = buf.get_f32_le();
29447            *v = val;
29448        }
29449        for v in &mut __struct.acc_x {
29450            let val = buf.get_f32_le();
29451            *v = val;
29452        }
29453        for v in &mut __struct.acc_y {
29454            let val = buf.get_f32_le();
29455            *v = val;
29456        }
29457        for v in &mut __struct.acc_z {
29458            let val = buf.get_f32_le();
29459            *v = val;
29460        }
29461        for v in &mut __struct.pos_yaw {
29462            let val = buf.get_f32_le();
29463            *v = val;
29464        }
29465        for v in &mut __struct.vel_yaw {
29466            let val = buf.get_f32_le();
29467            *v = val;
29468        }
29469        for v in &mut __struct.command {
29470            let val = buf.get_u16_le();
29471            *v = val;
29472        }
29473        __struct.valid_points = buf.get_u8();
29474        Ok(__struct)
29475    }
29476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29477        let mut __tmp = BytesMut::new(bytes);
29478        #[allow(clippy::absurd_extreme_comparisons)]
29479        #[allow(unused_comparisons)]
29480        if __tmp.remaining() < Self::ENCODED_LEN {
29481            panic!(
29482                "buffer is too small (need {} bytes, but got {})",
29483                Self::ENCODED_LEN,
29484                __tmp.remaining(),
29485            )
29486        }
29487        __tmp.put_u64_le(self.time_usec);
29488        for val in &self.pos_x {
29489            __tmp.put_f32_le(*val);
29490        }
29491        for val in &self.pos_y {
29492            __tmp.put_f32_le(*val);
29493        }
29494        for val in &self.pos_z {
29495            __tmp.put_f32_le(*val);
29496        }
29497        for val in &self.vel_x {
29498            __tmp.put_f32_le(*val);
29499        }
29500        for val in &self.vel_y {
29501            __tmp.put_f32_le(*val);
29502        }
29503        for val in &self.vel_z {
29504            __tmp.put_f32_le(*val);
29505        }
29506        for val in &self.acc_x {
29507            __tmp.put_f32_le(*val);
29508        }
29509        for val in &self.acc_y {
29510            __tmp.put_f32_le(*val);
29511        }
29512        for val in &self.acc_z {
29513            __tmp.put_f32_le(*val);
29514        }
29515        for val in &self.pos_yaw {
29516            __tmp.put_f32_le(*val);
29517        }
29518        for val in &self.vel_yaw {
29519            __tmp.put_f32_le(*val);
29520        }
29521        for val in &self.command {
29522            __tmp.put_u16_le(*val);
29523        }
29524        __tmp.put_u8(self.valid_points);
29525        if matches!(version, MavlinkVersion::V2) {
29526            let len = __tmp.len();
29527            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29528        } else {
29529            __tmp.len()
29530        }
29531    }
29532}
29533#[doc = "id: 385"]
29534#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
29535#[derive(Debug, Clone, PartialEq)]
29536#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29537#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29538pub struct TUNNEL_DATA {
29539    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
29540    pub payload_type: MavTunnelPayloadType,
29541    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
29542    pub target_system: u8,
29543    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
29544    pub target_component: u8,
29545    #[doc = "Length of the data transported in payload"]
29546    pub payload_length: u8,
29547    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
29548    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29549    pub payload: [u8; 128],
29550}
29551impl TUNNEL_DATA {
29552    pub const ENCODED_LEN: usize = 133usize;
29553    pub const DEFAULT: Self = Self {
29554        payload_type: MavTunnelPayloadType::DEFAULT,
29555        target_system: 0_u8,
29556        target_component: 0_u8,
29557        payload_length: 0_u8,
29558        payload: [0_u8; 128usize],
29559    };
29560    #[cfg(feature = "arbitrary")]
29561    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29562        use arbitrary::{Arbitrary, Unstructured};
29563        let mut buf = [0u8; 1024];
29564        rng.fill_bytes(&mut buf);
29565        let mut unstructured = Unstructured::new(&buf);
29566        Self::arbitrary(&mut unstructured).unwrap_or_default()
29567    }
29568}
29569impl Default for TUNNEL_DATA {
29570    fn default() -> Self {
29571        Self::DEFAULT.clone()
29572    }
29573}
29574impl MessageData for TUNNEL_DATA {
29575    type Message = MavMessage;
29576    const ID: u32 = 385u32;
29577    const NAME: &'static str = "TUNNEL";
29578    const EXTRA_CRC: u8 = 147u8;
29579    const ENCODED_LEN: usize = 133usize;
29580    fn deser(
29581        _version: MavlinkVersion,
29582        __input: &[u8],
29583    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29584        let avail_len = __input.len();
29585        let mut payload_buf = [0; Self::ENCODED_LEN];
29586        let mut buf = if avail_len < Self::ENCODED_LEN {
29587            payload_buf[0..avail_len].copy_from_slice(__input);
29588            Bytes::new(&payload_buf)
29589        } else {
29590            Bytes::new(__input)
29591        };
29592        let mut __struct = Self::default();
29593        let tmp = buf.get_u16_le();
29594        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
29595            ::mavlink_core::error::ParserError::InvalidEnum {
29596                enum_type: "MavTunnelPayloadType",
29597                value: tmp as u32,
29598            },
29599        )?;
29600        __struct.target_system = buf.get_u8();
29601        __struct.target_component = buf.get_u8();
29602        __struct.payload_length = buf.get_u8();
29603        for v in &mut __struct.payload {
29604            let val = buf.get_u8();
29605            *v = val;
29606        }
29607        Ok(__struct)
29608    }
29609    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29610        let mut __tmp = BytesMut::new(bytes);
29611        #[allow(clippy::absurd_extreme_comparisons)]
29612        #[allow(unused_comparisons)]
29613        if __tmp.remaining() < Self::ENCODED_LEN {
29614            panic!(
29615                "buffer is too small (need {} bytes, but got {})",
29616                Self::ENCODED_LEN,
29617                __tmp.remaining(),
29618            )
29619        }
29620        __tmp.put_u16_le(self.payload_type as u16);
29621        __tmp.put_u8(self.target_system);
29622        __tmp.put_u8(self.target_component);
29623        __tmp.put_u8(self.payload_length);
29624        for val in &self.payload {
29625            __tmp.put_u8(*val);
29626        }
29627        if matches!(version, MavlinkVersion::V2) {
29628            let len = __tmp.len();
29629            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29630        } else {
29631            __tmp.len()
29632        }
29633    }
29634}
29635#[doc = "id: 311"]
29636#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
29637#[derive(Debug, Clone, PartialEq)]
29638#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29639#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29640pub struct UAVCAN_NODE_INFO_DATA {
29641    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29642    pub time_usec: u64,
29643    #[doc = "Time since the start-up of the node."]
29644    pub uptime_sec: u32,
29645    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
29646    pub sw_vcs_commit: u32,
29647    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
29648    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29649    pub name: [u8; 80],
29650    #[doc = "Hardware major version number."]
29651    pub hw_version_major: u8,
29652    #[doc = "Hardware minor version number."]
29653    pub hw_version_minor: u8,
29654    #[doc = "Hardware unique 128-bit ID."]
29655    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29656    pub hw_unique_id: [u8; 16],
29657    #[doc = "Software major version number."]
29658    pub sw_version_major: u8,
29659    #[doc = "Software minor version number."]
29660    pub sw_version_minor: u8,
29661}
29662impl UAVCAN_NODE_INFO_DATA {
29663    pub const ENCODED_LEN: usize = 116usize;
29664    pub const DEFAULT: Self = Self {
29665        time_usec: 0_u64,
29666        uptime_sec: 0_u32,
29667        sw_vcs_commit: 0_u32,
29668        name: [0_u8; 80usize],
29669        hw_version_major: 0_u8,
29670        hw_version_minor: 0_u8,
29671        hw_unique_id: [0_u8; 16usize],
29672        sw_version_major: 0_u8,
29673        sw_version_minor: 0_u8,
29674    };
29675    #[cfg(feature = "arbitrary")]
29676    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29677        use arbitrary::{Arbitrary, Unstructured};
29678        let mut buf = [0u8; 1024];
29679        rng.fill_bytes(&mut buf);
29680        let mut unstructured = Unstructured::new(&buf);
29681        Self::arbitrary(&mut unstructured).unwrap_or_default()
29682    }
29683}
29684impl Default for UAVCAN_NODE_INFO_DATA {
29685    fn default() -> Self {
29686        Self::DEFAULT.clone()
29687    }
29688}
29689impl MessageData for UAVCAN_NODE_INFO_DATA {
29690    type Message = MavMessage;
29691    const ID: u32 = 311u32;
29692    const NAME: &'static str = "UAVCAN_NODE_INFO";
29693    const EXTRA_CRC: u8 = 95u8;
29694    const ENCODED_LEN: usize = 116usize;
29695    fn deser(
29696        _version: MavlinkVersion,
29697        __input: &[u8],
29698    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29699        let avail_len = __input.len();
29700        let mut payload_buf = [0; Self::ENCODED_LEN];
29701        let mut buf = if avail_len < Self::ENCODED_LEN {
29702            payload_buf[0..avail_len].copy_from_slice(__input);
29703            Bytes::new(&payload_buf)
29704        } else {
29705            Bytes::new(__input)
29706        };
29707        let mut __struct = Self::default();
29708        __struct.time_usec = buf.get_u64_le();
29709        __struct.uptime_sec = buf.get_u32_le();
29710        __struct.sw_vcs_commit = buf.get_u32_le();
29711        for v in &mut __struct.name {
29712            let val = buf.get_u8();
29713            *v = val;
29714        }
29715        __struct.hw_version_major = buf.get_u8();
29716        __struct.hw_version_minor = buf.get_u8();
29717        for v in &mut __struct.hw_unique_id {
29718            let val = buf.get_u8();
29719            *v = val;
29720        }
29721        __struct.sw_version_major = buf.get_u8();
29722        __struct.sw_version_minor = buf.get_u8();
29723        Ok(__struct)
29724    }
29725    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29726        let mut __tmp = BytesMut::new(bytes);
29727        #[allow(clippy::absurd_extreme_comparisons)]
29728        #[allow(unused_comparisons)]
29729        if __tmp.remaining() < Self::ENCODED_LEN {
29730            panic!(
29731                "buffer is too small (need {} bytes, but got {})",
29732                Self::ENCODED_LEN,
29733                __tmp.remaining(),
29734            )
29735        }
29736        __tmp.put_u64_le(self.time_usec);
29737        __tmp.put_u32_le(self.uptime_sec);
29738        __tmp.put_u32_le(self.sw_vcs_commit);
29739        for val in &self.name {
29740            __tmp.put_u8(*val);
29741        }
29742        __tmp.put_u8(self.hw_version_major);
29743        __tmp.put_u8(self.hw_version_minor);
29744        for val in &self.hw_unique_id {
29745            __tmp.put_u8(*val);
29746        }
29747        __tmp.put_u8(self.sw_version_major);
29748        __tmp.put_u8(self.sw_version_minor);
29749        if matches!(version, MavlinkVersion::V2) {
29750            let len = __tmp.len();
29751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29752        } else {
29753            __tmp.len()
29754        }
29755    }
29756}
29757#[doc = "id: 310"]
29758#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
29759#[derive(Debug, Clone, PartialEq)]
29760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29762pub struct UAVCAN_NODE_STATUS_DATA {
29763    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29764    pub time_usec: u64,
29765    #[doc = "Time since the start-up of the node."]
29766    pub uptime_sec: u32,
29767    #[doc = "Vendor-specific status information."]
29768    pub vendor_specific_status_code: u16,
29769    #[doc = "Generalized node health status."]
29770    pub health: UavcanNodeHealth,
29771    #[doc = "Generalized operating mode."]
29772    pub mode: UavcanNodeMode,
29773    #[doc = "Not used currently."]
29774    pub sub_mode: u8,
29775}
29776impl UAVCAN_NODE_STATUS_DATA {
29777    pub const ENCODED_LEN: usize = 17usize;
29778    pub const DEFAULT: Self = Self {
29779        time_usec: 0_u64,
29780        uptime_sec: 0_u32,
29781        vendor_specific_status_code: 0_u16,
29782        health: UavcanNodeHealth::DEFAULT,
29783        mode: UavcanNodeMode::DEFAULT,
29784        sub_mode: 0_u8,
29785    };
29786    #[cfg(feature = "arbitrary")]
29787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29788        use arbitrary::{Arbitrary, Unstructured};
29789        let mut buf = [0u8; 1024];
29790        rng.fill_bytes(&mut buf);
29791        let mut unstructured = Unstructured::new(&buf);
29792        Self::arbitrary(&mut unstructured).unwrap_or_default()
29793    }
29794}
29795impl Default for UAVCAN_NODE_STATUS_DATA {
29796    fn default() -> Self {
29797        Self::DEFAULT.clone()
29798    }
29799}
29800impl MessageData for UAVCAN_NODE_STATUS_DATA {
29801    type Message = MavMessage;
29802    const ID: u32 = 310u32;
29803    const NAME: &'static str = "UAVCAN_NODE_STATUS";
29804    const EXTRA_CRC: u8 = 28u8;
29805    const ENCODED_LEN: usize = 17usize;
29806    fn deser(
29807        _version: MavlinkVersion,
29808        __input: &[u8],
29809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29810        let avail_len = __input.len();
29811        let mut payload_buf = [0; Self::ENCODED_LEN];
29812        let mut buf = if avail_len < Self::ENCODED_LEN {
29813            payload_buf[0..avail_len].copy_from_slice(__input);
29814            Bytes::new(&payload_buf)
29815        } else {
29816            Bytes::new(__input)
29817        };
29818        let mut __struct = Self::default();
29819        __struct.time_usec = buf.get_u64_le();
29820        __struct.uptime_sec = buf.get_u32_le();
29821        __struct.vendor_specific_status_code = buf.get_u16_le();
29822        let tmp = buf.get_u8();
29823        __struct.health =
29824            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29825                enum_type: "UavcanNodeHealth",
29826                value: tmp as u32,
29827            })?;
29828        let tmp = buf.get_u8();
29829        __struct.mode =
29830            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29831                enum_type: "UavcanNodeMode",
29832                value: tmp as u32,
29833            })?;
29834        __struct.sub_mode = buf.get_u8();
29835        Ok(__struct)
29836    }
29837    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29838        let mut __tmp = BytesMut::new(bytes);
29839        #[allow(clippy::absurd_extreme_comparisons)]
29840        #[allow(unused_comparisons)]
29841        if __tmp.remaining() < Self::ENCODED_LEN {
29842            panic!(
29843                "buffer is too small (need {} bytes, but got {})",
29844                Self::ENCODED_LEN,
29845                __tmp.remaining(),
29846            )
29847        }
29848        __tmp.put_u64_le(self.time_usec);
29849        __tmp.put_u32_le(self.uptime_sec);
29850        __tmp.put_u16_le(self.vendor_specific_status_code);
29851        __tmp.put_u8(self.health as u8);
29852        __tmp.put_u8(self.mode as u8);
29853        __tmp.put_u8(self.sub_mode);
29854        if matches!(version, MavlinkVersion::V2) {
29855            let len = __tmp.len();
29856            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29857        } else {
29858            __tmp.len()
29859        }
29860    }
29861}
29862#[doc = "id: 340"]
29863#[doc = "The global position resulting from GPS and sensor fusion."]
29864#[derive(Debug, Clone, PartialEq)]
29865#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29866#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29867pub struct UTM_GLOBAL_POSITION_DATA {
29868    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
29869    pub time: u64,
29870    #[doc = "Latitude (WGS84)"]
29871    pub lat: i32,
29872    #[doc = "Longitude (WGS84)"]
29873    pub lon: i32,
29874    #[doc = "Altitude (WGS84)"]
29875    pub alt: i32,
29876    #[doc = "Altitude above ground"]
29877    pub relative_alt: i32,
29878    #[doc = "Next waypoint, latitude (WGS84)"]
29879    pub next_lat: i32,
29880    #[doc = "Next waypoint, longitude (WGS84)"]
29881    pub next_lon: i32,
29882    #[doc = "Next waypoint, altitude (WGS84)"]
29883    pub next_alt: i32,
29884    #[doc = "Ground X speed (latitude, positive north)"]
29885    pub vx: i16,
29886    #[doc = "Ground Y speed (longitude, positive east)"]
29887    pub vy: i16,
29888    #[doc = "Ground Z speed (altitude, positive down)"]
29889    pub vz: i16,
29890    #[doc = "Horizontal position uncertainty (standard deviation)"]
29891    pub h_acc: u16,
29892    #[doc = "Altitude uncertainty (standard deviation)"]
29893    pub v_acc: u16,
29894    #[doc = "Speed uncertainty (standard deviation)"]
29895    pub vel_acc: u16,
29896    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
29897    pub update_rate: u16,
29898    #[doc = "Unique UAS ID."]
29899    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29900    pub uas_id: [u8; 18],
29901    #[doc = "Flight state"]
29902    pub flight_state: UtmFlightState,
29903    #[doc = "Bitwise OR combination of the data available flags."]
29904    pub flags: UtmDataAvailFlags,
29905}
29906impl UTM_GLOBAL_POSITION_DATA {
29907    pub const ENCODED_LEN: usize = 70usize;
29908    pub const DEFAULT: Self = Self {
29909        time: 0_u64,
29910        lat: 0_i32,
29911        lon: 0_i32,
29912        alt: 0_i32,
29913        relative_alt: 0_i32,
29914        next_lat: 0_i32,
29915        next_lon: 0_i32,
29916        next_alt: 0_i32,
29917        vx: 0_i16,
29918        vy: 0_i16,
29919        vz: 0_i16,
29920        h_acc: 0_u16,
29921        v_acc: 0_u16,
29922        vel_acc: 0_u16,
29923        update_rate: 0_u16,
29924        uas_id: [0_u8; 18usize],
29925        flight_state: UtmFlightState::DEFAULT,
29926        flags: UtmDataAvailFlags::DEFAULT,
29927    };
29928    #[cfg(feature = "arbitrary")]
29929    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29930        use arbitrary::{Arbitrary, Unstructured};
29931        let mut buf = [0u8; 1024];
29932        rng.fill_bytes(&mut buf);
29933        let mut unstructured = Unstructured::new(&buf);
29934        Self::arbitrary(&mut unstructured).unwrap_or_default()
29935    }
29936}
29937impl Default for UTM_GLOBAL_POSITION_DATA {
29938    fn default() -> Self {
29939        Self::DEFAULT.clone()
29940    }
29941}
29942impl MessageData for UTM_GLOBAL_POSITION_DATA {
29943    type Message = MavMessage;
29944    const ID: u32 = 340u32;
29945    const NAME: &'static str = "UTM_GLOBAL_POSITION";
29946    const EXTRA_CRC: u8 = 99u8;
29947    const ENCODED_LEN: usize = 70usize;
29948    fn deser(
29949        _version: MavlinkVersion,
29950        __input: &[u8],
29951    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29952        let avail_len = __input.len();
29953        let mut payload_buf = [0; Self::ENCODED_LEN];
29954        let mut buf = if avail_len < Self::ENCODED_LEN {
29955            payload_buf[0..avail_len].copy_from_slice(__input);
29956            Bytes::new(&payload_buf)
29957        } else {
29958            Bytes::new(__input)
29959        };
29960        let mut __struct = Self::default();
29961        __struct.time = buf.get_u64_le();
29962        __struct.lat = buf.get_i32_le();
29963        __struct.lon = buf.get_i32_le();
29964        __struct.alt = buf.get_i32_le();
29965        __struct.relative_alt = buf.get_i32_le();
29966        __struct.next_lat = buf.get_i32_le();
29967        __struct.next_lon = buf.get_i32_le();
29968        __struct.next_alt = buf.get_i32_le();
29969        __struct.vx = buf.get_i16_le();
29970        __struct.vy = buf.get_i16_le();
29971        __struct.vz = buf.get_i16_le();
29972        __struct.h_acc = buf.get_u16_le();
29973        __struct.v_acc = buf.get_u16_le();
29974        __struct.vel_acc = buf.get_u16_le();
29975        __struct.update_rate = buf.get_u16_le();
29976        for v in &mut __struct.uas_id {
29977            let val = buf.get_u8();
29978            *v = val;
29979        }
29980        let tmp = buf.get_u8();
29981        __struct.flight_state =
29982            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29983                enum_type: "UtmFlightState",
29984                value: tmp as u32,
29985            })?;
29986        let tmp = buf.get_u8();
29987        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
29988            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29989                flag_type: "UtmDataAvailFlags",
29990                value: tmp as u32,
29991            })?;
29992        Ok(__struct)
29993    }
29994    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29995        let mut __tmp = BytesMut::new(bytes);
29996        #[allow(clippy::absurd_extreme_comparisons)]
29997        #[allow(unused_comparisons)]
29998        if __tmp.remaining() < Self::ENCODED_LEN {
29999            panic!(
30000                "buffer is too small (need {} bytes, but got {})",
30001                Self::ENCODED_LEN,
30002                __tmp.remaining(),
30003            )
30004        }
30005        __tmp.put_u64_le(self.time);
30006        __tmp.put_i32_le(self.lat);
30007        __tmp.put_i32_le(self.lon);
30008        __tmp.put_i32_le(self.alt);
30009        __tmp.put_i32_le(self.relative_alt);
30010        __tmp.put_i32_le(self.next_lat);
30011        __tmp.put_i32_le(self.next_lon);
30012        __tmp.put_i32_le(self.next_alt);
30013        __tmp.put_i16_le(self.vx);
30014        __tmp.put_i16_le(self.vy);
30015        __tmp.put_i16_le(self.vz);
30016        __tmp.put_u16_le(self.h_acc);
30017        __tmp.put_u16_le(self.v_acc);
30018        __tmp.put_u16_le(self.vel_acc);
30019        __tmp.put_u16_le(self.update_rate);
30020        for val in &self.uas_id {
30021            __tmp.put_u8(*val);
30022        }
30023        __tmp.put_u8(self.flight_state as u8);
30024        __tmp.put_u8(self.flags.bits());
30025        if matches!(version, MavlinkVersion::V2) {
30026            let len = __tmp.len();
30027            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30028        } else {
30029            __tmp.len()
30030        }
30031    }
30032}
30033#[doc = "id: 248"]
30034#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
30035#[derive(Debug, Clone, PartialEq)]
30036#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30037#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30038pub struct V2_EXTENSION_DATA {
30039    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30040    pub message_type: u16,
30041    #[doc = "Network ID (0 for broadcast)"]
30042    pub target_network: u8,
30043    #[doc = "System ID (0 for broadcast)"]
30044    pub target_system: u8,
30045    #[doc = "Component ID (0 for broadcast)"]
30046    pub target_component: u8,
30047    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
30048    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30049    pub payload: [u8; 249],
30050}
30051impl V2_EXTENSION_DATA {
30052    pub const ENCODED_LEN: usize = 254usize;
30053    pub const DEFAULT: Self = Self {
30054        message_type: 0_u16,
30055        target_network: 0_u8,
30056        target_system: 0_u8,
30057        target_component: 0_u8,
30058        payload: [0_u8; 249usize],
30059    };
30060    #[cfg(feature = "arbitrary")]
30061    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30062        use arbitrary::{Arbitrary, Unstructured};
30063        let mut buf = [0u8; 1024];
30064        rng.fill_bytes(&mut buf);
30065        let mut unstructured = Unstructured::new(&buf);
30066        Self::arbitrary(&mut unstructured).unwrap_or_default()
30067    }
30068}
30069impl Default for V2_EXTENSION_DATA {
30070    fn default() -> Self {
30071        Self::DEFAULT.clone()
30072    }
30073}
30074impl MessageData for V2_EXTENSION_DATA {
30075    type Message = MavMessage;
30076    const ID: u32 = 248u32;
30077    const NAME: &'static str = "V2_EXTENSION";
30078    const EXTRA_CRC: u8 = 8u8;
30079    const ENCODED_LEN: usize = 254usize;
30080    fn deser(
30081        _version: MavlinkVersion,
30082        __input: &[u8],
30083    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30084        let avail_len = __input.len();
30085        let mut payload_buf = [0; Self::ENCODED_LEN];
30086        let mut buf = if avail_len < Self::ENCODED_LEN {
30087            payload_buf[0..avail_len].copy_from_slice(__input);
30088            Bytes::new(&payload_buf)
30089        } else {
30090            Bytes::new(__input)
30091        };
30092        let mut __struct = Self::default();
30093        __struct.message_type = buf.get_u16_le();
30094        __struct.target_network = buf.get_u8();
30095        __struct.target_system = buf.get_u8();
30096        __struct.target_component = buf.get_u8();
30097        for v in &mut __struct.payload {
30098            let val = buf.get_u8();
30099            *v = val;
30100        }
30101        Ok(__struct)
30102    }
30103    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30104        let mut __tmp = BytesMut::new(bytes);
30105        #[allow(clippy::absurd_extreme_comparisons)]
30106        #[allow(unused_comparisons)]
30107        if __tmp.remaining() < Self::ENCODED_LEN {
30108            panic!(
30109                "buffer is too small (need {} bytes, but got {})",
30110                Self::ENCODED_LEN,
30111                __tmp.remaining(),
30112            )
30113        }
30114        __tmp.put_u16_le(self.message_type);
30115        __tmp.put_u8(self.target_network);
30116        __tmp.put_u8(self.target_system);
30117        __tmp.put_u8(self.target_component);
30118        for val in &self.payload {
30119            __tmp.put_u8(*val);
30120        }
30121        if matches!(version, MavlinkVersion::V2) {
30122            let len = __tmp.len();
30123            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30124        } else {
30125            __tmp.len()
30126        }
30127    }
30128}
30129#[doc = "id: 74"]
30130#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
30131#[derive(Debug, Clone, PartialEq)]
30132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30133#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30134pub struct VFR_HUD_DATA {
30135    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
30136    pub airspeed: f32,
30137    #[doc = "Current ground speed."]
30138    pub groundspeed: f32,
30139    #[doc = "Current altitude (MSL)."]
30140    pub alt: f32,
30141    #[doc = "Current climb rate."]
30142    pub climb: f32,
30143    #[doc = "Current heading in compass units (0-360, 0=north)."]
30144    pub heading: i16,
30145    #[doc = "Current throttle setting (0 to 100)."]
30146    pub throttle: u16,
30147}
30148impl VFR_HUD_DATA {
30149    pub const ENCODED_LEN: usize = 20usize;
30150    pub const DEFAULT: Self = Self {
30151        airspeed: 0.0_f32,
30152        groundspeed: 0.0_f32,
30153        alt: 0.0_f32,
30154        climb: 0.0_f32,
30155        heading: 0_i16,
30156        throttle: 0_u16,
30157    };
30158    #[cfg(feature = "arbitrary")]
30159    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30160        use arbitrary::{Arbitrary, Unstructured};
30161        let mut buf = [0u8; 1024];
30162        rng.fill_bytes(&mut buf);
30163        let mut unstructured = Unstructured::new(&buf);
30164        Self::arbitrary(&mut unstructured).unwrap_or_default()
30165    }
30166}
30167impl Default for VFR_HUD_DATA {
30168    fn default() -> Self {
30169        Self::DEFAULT.clone()
30170    }
30171}
30172impl MessageData for VFR_HUD_DATA {
30173    type Message = MavMessage;
30174    const ID: u32 = 74u32;
30175    const NAME: &'static str = "VFR_HUD";
30176    const EXTRA_CRC: u8 = 20u8;
30177    const ENCODED_LEN: usize = 20usize;
30178    fn deser(
30179        _version: MavlinkVersion,
30180        __input: &[u8],
30181    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30182        let avail_len = __input.len();
30183        let mut payload_buf = [0; Self::ENCODED_LEN];
30184        let mut buf = if avail_len < Self::ENCODED_LEN {
30185            payload_buf[0..avail_len].copy_from_slice(__input);
30186            Bytes::new(&payload_buf)
30187        } else {
30188            Bytes::new(__input)
30189        };
30190        let mut __struct = Self::default();
30191        __struct.airspeed = buf.get_f32_le();
30192        __struct.groundspeed = buf.get_f32_le();
30193        __struct.alt = buf.get_f32_le();
30194        __struct.climb = buf.get_f32_le();
30195        __struct.heading = buf.get_i16_le();
30196        __struct.throttle = buf.get_u16_le();
30197        Ok(__struct)
30198    }
30199    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30200        let mut __tmp = BytesMut::new(bytes);
30201        #[allow(clippy::absurd_extreme_comparisons)]
30202        #[allow(unused_comparisons)]
30203        if __tmp.remaining() < Self::ENCODED_LEN {
30204            panic!(
30205                "buffer is too small (need {} bytes, but got {})",
30206                Self::ENCODED_LEN,
30207                __tmp.remaining(),
30208            )
30209        }
30210        __tmp.put_f32_le(self.airspeed);
30211        __tmp.put_f32_le(self.groundspeed);
30212        __tmp.put_f32_le(self.alt);
30213        __tmp.put_f32_le(self.climb);
30214        __tmp.put_i16_le(self.heading);
30215        __tmp.put_u16_le(self.throttle);
30216        if matches!(version, MavlinkVersion::V2) {
30217            let len = __tmp.len();
30218            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30219        } else {
30220            __tmp.len()
30221        }
30222    }
30223}
30224#[doc = "id: 241"]
30225#[doc = "Vibration levels and accelerometer clipping."]
30226#[derive(Debug, Clone, PartialEq)]
30227#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30228#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30229pub struct VIBRATION_DATA {
30230    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30231    pub time_usec: u64,
30232    #[doc = "Vibration levels on X-axis"]
30233    pub vibration_x: f32,
30234    #[doc = "Vibration levels on Y-axis"]
30235    pub vibration_y: f32,
30236    #[doc = "Vibration levels on Z-axis"]
30237    pub vibration_z: f32,
30238    #[doc = "first accelerometer clipping count"]
30239    pub clipping_0: u32,
30240    #[doc = "second accelerometer clipping count"]
30241    pub clipping_1: u32,
30242    #[doc = "third accelerometer clipping count"]
30243    pub clipping_2: u32,
30244}
30245impl VIBRATION_DATA {
30246    pub const ENCODED_LEN: usize = 32usize;
30247    pub const DEFAULT: Self = Self {
30248        time_usec: 0_u64,
30249        vibration_x: 0.0_f32,
30250        vibration_y: 0.0_f32,
30251        vibration_z: 0.0_f32,
30252        clipping_0: 0_u32,
30253        clipping_1: 0_u32,
30254        clipping_2: 0_u32,
30255    };
30256    #[cfg(feature = "arbitrary")]
30257    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30258        use arbitrary::{Arbitrary, Unstructured};
30259        let mut buf = [0u8; 1024];
30260        rng.fill_bytes(&mut buf);
30261        let mut unstructured = Unstructured::new(&buf);
30262        Self::arbitrary(&mut unstructured).unwrap_or_default()
30263    }
30264}
30265impl Default for VIBRATION_DATA {
30266    fn default() -> Self {
30267        Self::DEFAULT.clone()
30268    }
30269}
30270impl MessageData for VIBRATION_DATA {
30271    type Message = MavMessage;
30272    const ID: u32 = 241u32;
30273    const NAME: &'static str = "VIBRATION";
30274    const EXTRA_CRC: u8 = 90u8;
30275    const ENCODED_LEN: usize = 32usize;
30276    fn deser(
30277        _version: MavlinkVersion,
30278        __input: &[u8],
30279    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30280        let avail_len = __input.len();
30281        let mut payload_buf = [0; Self::ENCODED_LEN];
30282        let mut buf = if avail_len < Self::ENCODED_LEN {
30283            payload_buf[0..avail_len].copy_from_slice(__input);
30284            Bytes::new(&payload_buf)
30285        } else {
30286            Bytes::new(__input)
30287        };
30288        let mut __struct = Self::default();
30289        __struct.time_usec = buf.get_u64_le();
30290        __struct.vibration_x = buf.get_f32_le();
30291        __struct.vibration_y = buf.get_f32_le();
30292        __struct.vibration_z = buf.get_f32_le();
30293        __struct.clipping_0 = buf.get_u32_le();
30294        __struct.clipping_1 = buf.get_u32_le();
30295        __struct.clipping_2 = buf.get_u32_le();
30296        Ok(__struct)
30297    }
30298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30299        let mut __tmp = BytesMut::new(bytes);
30300        #[allow(clippy::absurd_extreme_comparisons)]
30301        #[allow(unused_comparisons)]
30302        if __tmp.remaining() < Self::ENCODED_LEN {
30303            panic!(
30304                "buffer is too small (need {} bytes, but got {})",
30305                Self::ENCODED_LEN,
30306                __tmp.remaining(),
30307            )
30308        }
30309        __tmp.put_u64_le(self.time_usec);
30310        __tmp.put_f32_le(self.vibration_x);
30311        __tmp.put_f32_le(self.vibration_y);
30312        __tmp.put_f32_le(self.vibration_z);
30313        __tmp.put_u32_le(self.clipping_0);
30314        __tmp.put_u32_le(self.clipping_1);
30315        __tmp.put_u32_le(self.clipping_2);
30316        if matches!(version, MavlinkVersion::V2) {
30317            let len = __tmp.len();
30318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30319        } else {
30320            __tmp.len()
30321        }
30322    }
30323}
30324#[doc = "id: 104"]
30325#[doc = "Global position estimate from a Vicon motion system source."]
30326#[derive(Debug, Clone, PartialEq)]
30327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30329pub struct VICON_POSITION_ESTIMATE_DATA {
30330    #[doc = "Timestamp (UNIX time or time since system boot)"]
30331    pub usec: u64,
30332    #[doc = "Global X position"]
30333    pub x: f32,
30334    #[doc = "Global Y position"]
30335    pub y: f32,
30336    #[doc = "Global Z position"]
30337    pub z: f32,
30338    #[doc = "Roll angle"]
30339    pub roll: f32,
30340    #[doc = "Pitch angle"]
30341    pub pitch: f32,
30342    #[doc = "Yaw angle"]
30343    pub yaw: f32,
30344    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30345    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30347    pub covariance: [f32; 21],
30348}
30349impl VICON_POSITION_ESTIMATE_DATA {
30350    pub const ENCODED_LEN: usize = 116usize;
30351    pub const DEFAULT: Self = Self {
30352        usec: 0_u64,
30353        x: 0.0_f32,
30354        y: 0.0_f32,
30355        z: 0.0_f32,
30356        roll: 0.0_f32,
30357        pitch: 0.0_f32,
30358        yaw: 0.0_f32,
30359        covariance: [0.0_f32; 21usize],
30360    };
30361    #[cfg(feature = "arbitrary")]
30362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30363        use arbitrary::{Arbitrary, Unstructured};
30364        let mut buf = [0u8; 1024];
30365        rng.fill_bytes(&mut buf);
30366        let mut unstructured = Unstructured::new(&buf);
30367        Self::arbitrary(&mut unstructured).unwrap_or_default()
30368    }
30369}
30370impl Default for VICON_POSITION_ESTIMATE_DATA {
30371    fn default() -> Self {
30372        Self::DEFAULT.clone()
30373    }
30374}
30375impl MessageData for VICON_POSITION_ESTIMATE_DATA {
30376    type Message = MavMessage;
30377    const ID: u32 = 104u32;
30378    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
30379    const EXTRA_CRC: u8 = 56u8;
30380    const ENCODED_LEN: usize = 116usize;
30381    fn deser(
30382        _version: MavlinkVersion,
30383        __input: &[u8],
30384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30385        let avail_len = __input.len();
30386        let mut payload_buf = [0; Self::ENCODED_LEN];
30387        let mut buf = if avail_len < Self::ENCODED_LEN {
30388            payload_buf[0..avail_len].copy_from_slice(__input);
30389            Bytes::new(&payload_buf)
30390        } else {
30391            Bytes::new(__input)
30392        };
30393        let mut __struct = Self::default();
30394        __struct.usec = buf.get_u64_le();
30395        __struct.x = buf.get_f32_le();
30396        __struct.y = buf.get_f32_le();
30397        __struct.z = buf.get_f32_le();
30398        __struct.roll = buf.get_f32_le();
30399        __struct.pitch = buf.get_f32_le();
30400        __struct.yaw = buf.get_f32_le();
30401        for v in &mut __struct.covariance {
30402            let val = buf.get_f32_le();
30403            *v = val;
30404        }
30405        Ok(__struct)
30406    }
30407    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30408        let mut __tmp = BytesMut::new(bytes);
30409        #[allow(clippy::absurd_extreme_comparisons)]
30410        #[allow(unused_comparisons)]
30411        if __tmp.remaining() < Self::ENCODED_LEN {
30412            panic!(
30413                "buffer is too small (need {} bytes, but got {})",
30414                Self::ENCODED_LEN,
30415                __tmp.remaining(),
30416            )
30417        }
30418        __tmp.put_u64_le(self.usec);
30419        __tmp.put_f32_le(self.x);
30420        __tmp.put_f32_le(self.y);
30421        __tmp.put_f32_le(self.z);
30422        __tmp.put_f32_le(self.roll);
30423        __tmp.put_f32_le(self.pitch);
30424        __tmp.put_f32_le(self.yaw);
30425        for val in &self.covariance {
30426            __tmp.put_f32_le(*val);
30427        }
30428        if matches!(version, MavlinkVersion::V2) {
30429            let len = __tmp.len();
30430            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30431        } else {
30432            __tmp.len()
30433        }
30434    }
30435}
30436#[doc = "id: 269"]
30437#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
30438#[derive(Debug, Clone, PartialEq)]
30439#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30440#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30441pub struct VIDEO_STREAM_INFORMATION_DATA {
30442    #[doc = "Frame rate."]
30443    pub framerate: f32,
30444    #[doc = "Bit rate."]
30445    pub bitrate: u32,
30446    #[doc = "Bitmap of stream status flags."]
30447    pub flags: VideoStreamStatusFlags,
30448    #[doc = "Horizontal resolution."]
30449    pub resolution_h: u16,
30450    #[doc = "Vertical resolution."]
30451    pub resolution_v: u16,
30452    #[doc = "Video image rotation clockwise."]
30453    pub rotation: u16,
30454    #[doc = "Horizontal Field of view."]
30455    pub hfov: u16,
30456    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30457    pub stream_id: u8,
30458    #[doc = "Number of streams available."]
30459    pub count: u8,
30460    #[doc = "Type of stream."]
30461    pub mavtype: VideoStreamType,
30462    #[doc = "Stream name."]
30463    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30464    pub name: [u8; 32],
30465    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
30466    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30467    pub uri: [u8; 160],
30468    #[doc = "Encoding of stream."]
30469    #[cfg_attr(feature = "serde", serde(default))]
30470    pub encoding: VideoStreamEncoding,
30471    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30472    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30473    pub camera_device_id: u8,
30474}
30475impl VIDEO_STREAM_INFORMATION_DATA {
30476    pub const ENCODED_LEN: usize = 215usize;
30477    pub const DEFAULT: Self = Self {
30478        framerate: 0.0_f32,
30479        bitrate: 0_u32,
30480        flags: VideoStreamStatusFlags::DEFAULT,
30481        resolution_h: 0_u16,
30482        resolution_v: 0_u16,
30483        rotation: 0_u16,
30484        hfov: 0_u16,
30485        stream_id: 0_u8,
30486        count: 0_u8,
30487        mavtype: VideoStreamType::DEFAULT,
30488        name: [0_u8; 32usize],
30489        uri: [0_u8; 160usize],
30490        encoding: VideoStreamEncoding::DEFAULT,
30491        camera_device_id: 0_u8,
30492    };
30493    #[cfg(feature = "arbitrary")]
30494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30495        use arbitrary::{Arbitrary, Unstructured};
30496        let mut buf = [0u8; 1024];
30497        rng.fill_bytes(&mut buf);
30498        let mut unstructured = Unstructured::new(&buf);
30499        Self::arbitrary(&mut unstructured).unwrap_or_default()
30500    }
30501}
30502impl Default for VIDEO_STREAM_INFORMATION_DATA {
30503    fn default() -> Self {
30504        Self::DEFAULT.clone()
30505    }
30506}
30507impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
30508    type Message = MavMessage;
30509    const ID: u32 = 269u32;
30510    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
30511    const EXTRA_CRC: u8 = 109u8;
30512    const ENCODED_LEN: usize = 215usize;
30513    fn deser(
30514        _version: MavlinkVersion,
30515        __input: &[u8],
30516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30517        let avail_len = __input.len();
30518        let mut payload_buf = [0; Self::ENCODED_LEN];
30519        let mut buf = if avail_len < Self::ENCODED_LEN {
30520            payload_buf[0..avail_len].copy_from_slice(__input);
30521            Bytes::new(&payload_buf)
30522        } else {
30523            Bytes::new(__input)
30524        };
30525        let mut __struct = Self::default();
30526        __struct.framerate = buf.get_f32_le();
30527        __struct.bitrate = buf.get_u32_le();
30528        let tmp = buf.get_u16_le();
30529        __struct.flags = VideoStreamStatusFlags::from_bits(
30530            tmp & VideoStreamStatusFlags::all().bits(),
30531        )
30532        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30533            flag_type: "VideoStreamStatusFlags",
30534            value: tmp as u32,
30535        })?;
30536        __struct.resolution_h = buf.get_u16_le();
30537        __struct.resolution_v = buf.get_u16_le();
30538        __struct.rotation = buf.get_u16_le();
30539        __struct.hfov = buf.get_u16_le();
30540        __struct.stream_id = buf.get_u8();
30541        __struct.count = buf.get_u8();
30542        let tmp = buf.get_u8();
30543        __struct.mavtype =
30544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30545                enum_type: "VideoStreamType",
30546                value: tmp as u32,
30547            })?;
30548        for v in &mut __struct.name {
30549            let val = buf.get_u8();
30550            *v = val;
30551        }
30552        for v in &mut __struct.uri {
30553            let val = buf.get_u8();
30554            *v = val;
30555        }
30556        let tmp = buf.get_u8();
30557        __struct.encoding =
30558            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30559                enum_type: "VideoStreamEncoding",
30560                value: tmp as u32,
30561            })?;
30562        __struct.camera_device_id = buf.get_u8();
30563        Ok(__struct)
30564    }
30565    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30566        let mut __tmp = BytesMut::new(bytes);
30567        #[allow(clippy::absurd_extreme_comparisons)]
30568        #[allow(unused_comparisons)]
30569        if __tmp.remaining() < Self::ENCODED_LEN {
30570            panic!(
30571                "buffer is too small (need {} bytes, but got {})",
30572                Self::ENCODED_LEN,
30573                __tmp.remaining(),
30574            )
30575        }
30576        __tmp.put_f32_le(self.framerate);
30577        __tmp.put_u32_le(self.bitrate);
30578        __tmp.put_u16_le(self.flags.bits());
30579        __tmp.put_u16_le(self.resolution_h);
30580        __tmp.put_u16_le(self.resolution_v);
30581        __tmp.put_u16_le(self.rotation);
30582        __tmp.put_u16_le(self.hfov);
30583        __tmp.put_u8(self.stream_id);
30584        __tmp.put_u8(self.count);
30585        __tmp.put_u8(self.mavtype as u8);
30586        for val in &self.name {
30587            __tmp.put_u8(*val);
30588        }
30589        for val in &self.uri {
30590            __tmp.put_u8(*val);
30591        }
30592        __tmp.put_u8(self.encoding as u8);
30593        __tmp.put_u8(self.camera_device_id);
30594        if matches!(version, MavlinkVersion::V2) {
30595            let len = __tmp.len();
30596            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30597        } else {
30598            __tmp.len()
30599        }
30600    }
30601}
30602#[doc = "id: 270"]
30603#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
30604#[derive(Debug, Clone, PartialEq)]
30605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30607pub struct VIDEO_STREAM_STATUS_DATA {
30608    #[doc = "Frame rate"]
30609    pub framerate: f32,
30610    #[doc = "Bit rate"]
30611    pub bitrate: u32,
30612    #[doc = "Bitmap of stream status flags"]
30613    pub flags: VideoStreamStatusFlags,
30614    #[doc = "Horizontal resolution"]
30615    pub resolution_h: u16,
30616    #[doc = "Vertical resolution"]
30617    pub resolution_v: u16,
30618    #[doc = "Video image rotation clockwise"]
30619    pub rotation: u16,
30620    #[doc = "Horizontal Field of view"]
30621    pub hfov: u16,
30622    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30623    pub stream_id: u8,
30624    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30625    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30626    pub camera_device_id: u8,
30627}
30628impl VIDEO_STREAM_STATUS_DATA {
30629    pub const ENCODED_LEN: usize = 20usize;
30630    pub const DEFAULT: Self = Self {
30631        framerate: 0.0_f32,
30632        bitrate: 0_u32,
30633        flags: VideoStreamStatusFlags::DEFAULT,
30634        resolution_h: 0_u16,
30635        resolution_v: 0_u16,
30636        rotation: 0_u16,
30637        hfov: 0_u16,
30638        stream_id: 0_u8,
30639        camera_device_id: 0_u8,
30640    };
30641    #[cfg(feature = "arbitrary")]
30642    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30643        use arbitrary::{Arbitrary, Unstructured};
30644        let mut buf = [0u8; 1024];
30645        rng.fill_bytes(&mut buf);
30646        let mut unstructured = Unstructured::new(&buf);
30647        Self::arbitrary(&mut unstructured).unwrap_or_default()
30648    }
30649}
30650impl Default for VIDEO_STREAM_STATUS_DATA {
30651    fn default() -> Self {
30652        Self::DEFAULT.clone()
30653    }
30654}
30655impl MessageData for VIDEO_STREAM_STATUS_DATA {
30656    type Message = MavMessage;
30657    const ID: u32 = 270u32;
30658    const NAME: &'static str = "VIDEO_STREAM_STATUS";
30659    const EXTRA_CRC: u8 = 59u8;
30660    const ENCODED_LEN: usize = 20usize;
30661    fn deser(
30662        _version: MavlinkVersion,
30663        __input: &[u8],
30664    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30665        let avail_len = __input.len();
30666        let mut payload_buf = [0; Self::ENCODED_LEN];
30667        let mut buf = if avail_len < Self::ENCODED_LEN {
30668            payload_buf[0..avail_len].copy_from_slice(__input);
30669            Bytes::new(&payload_buf)
30670        } else {
30671            Bytes::new(__input)
30672        };
30673        let mut __struct = Self::default();
30674        __struct.framerate = buf.get_f32_le();
30675        __struct.bitrate = buf.get_u32_le();
30676        let tmp = buf.get_u16_le();
30677        __struct.flags = VideoStreamStatusFlags::from_bits(
30678            tmp & VideoStreamStatusFlags::all().bits(),
30679        )
30680        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30681            flag_type: "VideoStreamStatusFlags",
30682            value: tmp as u32,
30683        })?;
30684        __struct.resolution_h = buf.get_u16_le();
30685        __struct.resolution_v = buf.get_u16_le();
30686        __struct.rotation = buf.get_u16_le();
30687        __struct.hfov = buf.get_u16_le();
30688        __struct.stream_id = buf.get_u8();
30689        __struct.camera_device_id = buf.get_u8();
30690        Ok(__struct)
30691    }
30692    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30693        let mut __tmp = BytesMut::new(bytes);
30694        #[allow(clippy::absurd_extreme_comparisons)]
30695        #[allow(unused_comparisons)]
30696        if __tmp.remaining() < Self::ENCODED_LEN {
30697            panic!(
30698                "buffer is too small (need {} bytes, but got {})",
30699                Self::ENCODED_LEN,
30700                __tmp.remaining(),
30701            )
30702        }
30703        __tmp.put_f32_le(self.framerate);
30704        __tmp.put_u32_le(self.bitrate);
30705        __tmp.put_u16_le(self.flags.bits());
30706        __tmp.put_u16_le(self.resolution_h);
30707        __tmp.put_u16_le(self.resolution_v);
30708        __tmp.put_u16_le(self.rotation);
30709        __tmp.put_u16_le(self.hfov);
30710        __tmp.put_u8(self.stream_id);
30711        __tmp.put_u8(self.camera_device_id);
30712        if matches!(version, MavlinkVersion::V2) {
30713            let len = __tmp.len();
30714            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30715        } else {
30716            __tmp.len()
30717        }
30718    }
30719}
30720#[doc = "id: 102"]
30721#[doc = "Local position/attitude estimate from a vision source."]
30722#[derive(Debug, Clone, PartialEq)]
30723#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30724#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30725pub struct VISION_POSITION_ESTIMATE_DATA {
30726    #[doc = "Timestamp (UNIX time or time since system boot)"]
30727    pub usec: u64,
30728    #[doc = "Local X position"]
30729    pub x: f32,
30730    #[doc = "Local Y position"]
30731    pub y: f32,
30732    #[doc = "Local Z position"]
30733    pub z: f32,
30734    #[doc = "Roll angle"]
30735    pub roll: f32,
30736    #[doc = "Pitch angle"]
30737    pub pitch: f32,
30738    #[doc = "Yaw angle"]
30739    pub yaw: f32,
30740    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30741    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30742    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30743    pub covariance: [f32; 21],
30744    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
30745    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30746    pub reset_counter: u8,
30747}
30748impl VISION_POSITION_ESTIMATE_DATA {
30749    pub const ENCODED_LEN: usize = 117usize;
30750    pub const DEFAULT: Self = Self {
30751        usec: 0_u64,
30752        x: 0.0_f32,
30753        y: 0.0_f32,
30754        z: 0.0_f32,
30755        roll: 0.0_f32,
30756        pitch: 0.0_f32,
30757        yaw: 0.0_f32,
30758        covariance: [0.0_f32; 21usize],
30759        reset_counter: 0_u8,
30760    };
30761    #[cfg(feature = "arbitrary")]
30762    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30763        use arbitrary::{Arbitrary, Unstructured};
30764        let mut buf = [0u8; 1024];
30765        rng.fill_bytes(&mut buf);
30766        let mut unstructured = Unstructured::new(&buf);
30767        Self::arbitrary(&mut unstructured).unwrap_or_default()
30768    }
30769}
30770impl Default for VISION_POSITION_ESTIMATE_DATA {
30771    fn default() -> Self {
30772        Self::DEFAULT.clone()
30773    }
30774}
30775impl MessageData for VISION_POSITION_ESTIMATE_DATA {
30776    type Message = MavMessage;
30777    const ID: u32 = 102u32;
30778    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
30779    const EXTRA_CRC: u8 = 158u8;
30780    const ENCODED_LEN: usize = 117usize;
30781    fn deser(
30782        _version: MavlinkVersion,
30783        __input: &[u8],
30784    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30785        let avail_len = __input.len();
30786        let mut payload_buf = [0; Self::ENCODED_LEN];
30787        let mut buf = if avail_len < Self::ENCODED_LEN {
30788            payload_buf[0..avail_len].copy_from_slice(__input);
30789            Bytes::new(&payload_buf)
30790        } else {
30791            Bytes::new(__input)
30792        };
30793        let mut __struct = Self::default();
30794        __struct.usec = buf.get_u64_le();
30795        __struct.x = buf.get_f32_le();
30796        __struct.y = buf.get_f32_le();
30797        __struct.z = buf.get_f32_le();
30798        __struct.roll = buf.get_f32_le();
30799        __struct.pitch = buf.get_f32_le();
30800        __struct.yaw = buf.get_f32_le();
30801        for v in &mut __struct.covariance {
30802            let val = buf.get_f32_le();
30803            *v = val;
30804        }
30805        __struct.reset_counter = buf.get_u8();
30806        Ok(__struct)
30807    }
30808    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30809        let mut __tmp = BytesMut::new(bytes);
30810        #[allow(clippy::absurd_extreme_comparisons)]
30811        #[allow(unused_comparisons)]
30812        if __tmp.remaining() < Self::ENCODED_LEN {
30813            panic!(
30814                "buffer is too small (need {} bytes, but got {})",
30815                Self::ENCODED_LEN,
30816                __tmp.remaining(),
30817            )
30818        }
30819        __tmp.put_u64_le(self.usec);
30820        __tmp.put_f32_le(self.x);
30821        __tmp.put_f32_le(self.y);
30822        __tmp.put_f32_le(self.z);
30823        __tmp.put_f32_le(self.roll);
30824        __tmp.put_f32_le(self.pitch);
30825        __tmp.put_f32_le(self.yaw);
30826        for val in &self.covariance {
30827            __tmp.put_f32_le(*val);
30828        }
30829        __tmp.put_u8(self.reset_counter);
30830        if matches!(version, MavlinkVersion::V2) {
30831            let len = __tmp.len();
30832            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30833        } else {
30834            __tmp.len()
30835        }
30836    }
30837}
30838#[doc = "id: 103"]
30839#[doc = "Speed estimate from a vision source."]
30840#[derive(Debug, Clone, PartialEq)]
30841#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30843pub struct VISION_SPEED_ESTIMATE_DATA {
30844    #[doc = "Timestamp (UNIX time or time since system boot)"]
30845    pub usec: u64,
30846    #[doc = "Global X speed"]
30847    pub x: f32,
30848    #[doc = "Global Y speed"]
30849    pub y: f32,
30850    #[doc = "Global Z speed"]
30851    pub z: f32,
30852    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
30853    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30854    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30855    pub covariance: [f32; 9],
30856    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
30857    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30858    pub reset_counter: u8,
30859}
30860impl VISION_SPEED_ESTIMATE_DATA {
30861    pub const ENCODED_LEN: usize = 57usize;
30862    pub const DEFAULT: Self = Self {
30863        usec: 0_u64,
30864        x: 0.0_f32,
30865        y: 0.0_f32,
30866        z: 0.0_f32,
30867        covariance: [0.0_f32; 9usize],
30868        reset_counter: 0_u8,
30869    };
30870    #[cfg(feature = "arbitrary")]
30871    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30872        use arbitrary::{Arbitrary, Unstructured};
30873        let mut buf = [0u8; 1024];
30874        rng.fill_bytes(&mut buf);
30875        let mut unstructured = Unstructured::new(&buf);
30876        Self::arbitrary(&mut unstructured).unwrap_or_default()
30877    }
30878}
30879impl Default for VISION_SPEED_ESTIMATE_DATA {
30880    fn default() -> Self {
30881        Self::DEFAULT.clone()
30882    }
30883}
30884impl MessageData for VISION_SPEED_ESTIMATE_DATA {
30885    type Message = MavMessage;
30886    const ID: u32 = 103u32;
30887    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
30888    const EXTRA_CRC: u8 = 208u8;
30889    const ENCODED_LEN: usize = 57usize;
30890    fn deser(
30891        _version: MavlinkVersion,
30892        __input: &[u8],
30893    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30894        let avail_len = __input.len();
30895        let mut payload_buf = [0; Self::ENCODED_LEN];
30896        let mut buf = if avail_len < Self::ENCODED_LEN {
30897            payload_buf[0..avail_len].copy_from_slice(__input);
30898            Bytes::new(&payload_buf)
30899        } else {
30900            Bytes::new(__input)
30901        };
30902        let mut __struct = Self::default();
30903        __struct.usec = buf.get_u64_le();
30904        __struct.x = buf.get_f32_le();
30905        __struct.y = buf.get_f32_le();
30906        __struct.z = buf.get_f32_le();
30907        for v in &mut __struct.covariance {
30908            let val = buf.get_f32_le();
30909            *v = val;
30910        }
30911        __struct.reset_counter = buf.get_u8();
30912        Ok(__struct)
30913    }
30914    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30915        let mut __tmp = BytesMut::new(bytes);
30916        #[allow(clippy::absurd_extreme_comparisons)]
30917        #[allow(unused_comparisons)]
30918        if __tmp.remaining() < Self::ENCODED_LEN {
30919            panic!(
30920                "buffer is too small (need {} bytes, but got {})",
30921                Self::ENCODED_LEN,
30922                __tmp.remaining(),
30923            )
30924        }
30925        __tmp.put_u64_le(self.usec);
30926        __tmp.put_f32_le(self.x);
30927        __tmp.put_f32_le(self.y);
30928        __tmp.put_f32_le(self.z);
30929        for val in &self.covariance {
30930            __tmp.put_f32_le(*val);
30931        }
30932        __tmp.put_u8(self.reset_counter);
30933        if matches!(version, MavlinkVersion::V2) {
30934            let len = __tmp.len();
30935            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30936        } else {
30937            __tmp.len()
30938        }
30939    }
30940}
30941#[doc = "id: 9000"]
30942#[doc = "Cumulative distance traveled for each reported wheel."]
30943#[derive(Debug, Clone, PartialEq)]
30944#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30945#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30946pub struct WHEEL_DISTANCE_DATA {
30947    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
30948    pub time_usec: u64,
30949    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
30950    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30951    pub distance: [f64; 16],
30952    #[doc = "Number of wheels reported."]
30953    pub count: u8,
30954}
30955impl WHEEL_DISTANCE_DATA {
30956    pub const ENCODED_LEN: usize = 137usize;
30957    pub const DEFAULT: Self = Self {
30958        time_usec: 0_u64,
30959        distance: [0.0_f64; 16usize],
30960        count: 0_u8,
30961    };
30962    #[cfg(feature = "arbitrary")]
30963    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30964        use arbitrary::{Arbitrary, Unstructured};
30965        let mut buf = [0u8; 1024];
30966        rng.fill_bytes(&mut buf);
30967        let mut unstructured = Unstructured::new(&buf);
30968        Self::arbitrary(&mut unstructured).unwrap_or_default()
30969    }
30970}
30971impl Default for WHEEL_DISTANCE_DATA {
30972    fn default() -> Self {
30973        Self::DEFAULT.clone()
30974    }
30975}
30976impl MessageData for WHEEL_DISTANCE_DATA {
30977    type Message = MavMessage;
30978    const ID: u32 = 9000u32;
30979    const NAME: &'static str = "WHEEL_DISTANCE";
30980    const EXTRA_CRC: u8 = 113u8;
30981    const ENCODED_LEN: usize = 137usize;
30982    fn deser(
30983        _version: MavlinkVersion,
30984        __input: &[u8],
30985    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30986        let avail_len = __input.len();
30987        let mut payload_buf = [0; Self::ENCODED_LEN];
30988        let mut buf = if avail_len < Self::ENCODED_LEN {
30989            payload_buf[0..avail_len].copy_from_slice(__input);
30990            Bytes::new(&payload_buf)
30991        } else {
30992            Bytes::new(__input)
30993        };
30994        let mut __struct = Self::default();
30995        __struct.time_usec = buf.get_u64_le();
30996        for v in &mut __struct.distance {
30997            let val = buf.get_f64_le();
30998            *v = val;
30999        }
31000        __struct.count = buf.get_u8();
31001        Ok(__struct)
31002    }
31003    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31004        let mut __tmp = BytesMut::new(bytes);
31005        #[allow(clippy::absurd_extreme_comparisons)]
31006        #[allow(unused_comparisons)]
31007        if __tmp.remaining() < Self::ENCODED_LEN {
31008            panic!(
31009                "buffer is too small (need {} bytes, but got {})",
31010                Self::ENCODED_LEN,
31011                __tmp.remaining(),
31012            )
31013        }
31014        __tmp.put_u64_le(self.time_usec);
31015        for val in &self.distance {
31016            __tmp.put_f64_le(*val);
31017        }
31018        __tmp.put_u8(self.count);
31019        if matches!(version, MavlinkVersion::V2) {
31020            let len = __tmp.len();
31021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31022        } else {
31023            __tmp.len()
31024        }
31025    }
31026}
31027#[doc = "id: 299"]
31028#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
31029#[derive(Debug, Clone, PartialEq)]
31030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31032pub struct WIFI_CONFIG_AP_DATA {
31033    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
31034    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31035    pub ssid: [u8; 32],
31036    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
31037    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31038    pub password: [u8; 64],
31039    #[doc = "WiFi Mode."]
31040    #[cfg_attr(feature = "serde", serde(default))]
31041    pub mode: WifiConfigApMode,
31042    #[doc = "Message acceptance response (sent back to GS)."]
31043    #[cfg_attr(feature = "serde", serde(default))]
31044    pub response: WifiConfigApResponse,
31045}
31046impl WIFI_CONFIG_AP_DATA {
31047    pub const ENCODED_LEN: usize = 98usize;
31048    pub const DEFAULT: Self = Self {
31049        ssid: [0_u8; 32usize],
31050        password: [0_u8; 64usize],
31051        mode: WifiConfigApMode::DEFAULT,
31052        response: WifiConfigApResponse::DEFAULT,
31053    };
31054    #[cfg(feature = "arbitrary")]
31055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31056        use arbitrary::{Arbitrary, Unstructured};
31057        let mut buf = [0u8; 1024];
31058        rng.fill_bytes(&mut buf);
31059        let mut unstructured = Unstructured::new(&buf);
31060        Self::arbitrary(&mut unstructured).unwrap_or_default()
31061    }
31062}
31063impl Default for WIFI_CONFIG_AP_DATA {
31064    fn default() -> Self {
31065        Self::DEFAULT.clone()
31066    }
31067}
31068impl MessageData for WIFI_CONFIG_AP_DATA {
31069    type Message = MavMessage;
31070    const ID: u32 = 299u32;
31071    const NAME: &'static str = "WIFI_CONFIG_AP";
31072    const EXTRA_CRC: u8 = 19u8;
31073    const ENCODED_LEN: usize = 98usize;
31074    fn deser(
31075        _version: MavlinkVersion,
31076        __input: &[u8],
31077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31078        let avail_len = __input.len();
31079        let mut payload_buf = [0; Self::ENCODED_LEN];
31080        let mut buf = if avail_len < Self::ENCODED_LEN {
31081            payload_buf[0..avail_len].copy_from_slice(__input);
31082            Bytes::new(&payload_buf)
31083        } else {
31084            Bytes::new(__input)
31085        };
31086        let mut __struct = Self::default();
31087        for v in &mut __struct.ssid {
31088            let val = buf.get_u8();
31089            *v = val;
31090        }
31091        for v in &mut __struct.password {
31092            let val = buf.get_u8();
31093            *v = val;
31094        }
31095        let tmp = buf.get_i8();
31096        __struct.mode =
31097            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31098                enum_type: "WifiConfigApMode",
31099                value: tmp as u32,
31100            })?;
31101        let tmp = buf.get_i8();
31102        __struct.response =
31103            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31104                enum_type: "WifiConfigApResponse",
31105                value: tmp as u32,
31106            })?;
31107        Ok(__struct)
31108    }
31109    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31110        let mut __tmp = BytesMut::new(bytes);
31111        #[allow(clippy::absurd_extreme_comparisons)]
31112        #[allow(unused_comparisons)]
31113        if __tmp.remaining() < Self::ENCODED_LEN {
31114            panic!(
31115                "buffer is too small (need {} bytes, but got {})",
31116                Self::ENCODED_LEN,
31117                __tmp.remaining(),
31118            )
31119        }
31120        for val in &self.ssid {
31121            __tmp.put_u8(*val);
31122        }
31123        for val in &self.password {
31124            __tmp.put_u8(*val);
31125        }
31126        __tmp.put_i8(self.mode as i8);
31127        __tmp.put_i8(self.response as i8);
31128        if matches!(version, MavlinkVersion::V2) {
31129            let len = __tmp.len();
31130            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31131        } else {
31132            __tmp.len()
31133        }
31134    }
31135}
31136#[doc = "id: 9005"]
31137#[doc = "Winch status."]
31138#[derive(Debug, Clone, PartialEq)]
31139#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31140#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31141pub struct WINCH_STATUS_DATA {
31142    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31143    pub time_usec: u64,
31144    #[doc = "Length of line released. NaN if unknown"]
31145    pub line_length: f32,
31146    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
31147    pub speed: f32,
31148    #[doc = "Tension on the line. NaN if unknown"]
31149    pub tension: f32,
31150    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
31151    pub voltage: f32,
31152    #[doc = "Current draw from the winch. NaN if unknown"]
31153    pub current: f32,
31154    #[doc = "Status flags"]
31155    pub status: MavWinchStatusFlag,
31156    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
31157    pub temperature: i16,
31158}
31159impl WINCH_STATUS_DATA {
31160    pub const ENCODED_LEN: usize = 34usize;
31161    pub const DEFAULT: Self = Self {
31162        time_usec: 0_u64,
31163        line_length: 0.0_f32,
31164        speed: 0.0_f32,
31165        tension: 0.0_f32,
31166        voltage: 0.0_f32,
31167        current: 0.0_f32,
31168        status: MavWinchStatusFlag::DEFAULT,
31169        temperature: 0_i16,
31170    };
31171    #[cfg(feature = "arbitrary")]
31172    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31173        use arbitrary::{Arbitrary, Unstructured};
31174        let mut buf = [0u8; 1024];
31175        rng.fill_bytes(&mut buf);
31176        let mut unstructured = Unstructured::new(&buf);
31177        Self::arbitrary(&mut unstructured).unwrap_or_default()
31178    }
31179}
31180impl Default for WINCH_STATUS_DATA {
31181    fn default() -> Self {
31182        Self::DEFAULT.clone()
31183    }
31184}
31185impl MessageData for WINCH_STATUS_DATA {
31186    type Message = MavMessage;
31187    const ID: u32 = 9005u32;
31188    const NAME: &'static str = "WINCH_STATUS";
31189    const EXTRA_CRC: u8 = 117u8;
31190    const ENCODED_LEN: usize = 34usize;
31191    fn deser(
31192        _version: MavlinkVersion,
31193        __input: &[u8],
31194    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31195        let avail_len = __input.len();
31196        let mut payload_buf = [0; Self::ENCODED_LEN];
31197        let mut buf = if avail_len < Self::ENCODED_LEN {
31198            payload_buf[0..avail_len].copy_from_slice(__input);
31199            Bytes::new(&payload_buf)
31200        } else {
31201            Bytes::new(__input)
31202        };
31203        let mut __struct = Self::default();
31204        __struct.time_usec = buf.get_u64_le();
31205        __struct.line_length = buf.get_f32_le();
31206        __struct.speed = buf.get_f32_le();
31207        __struct.tension = buf.get_f32_le();
31208        __struct.voltage = buf.get_f32_le();
31209        __struct.current = buf.get_f32_le();
31210        let tmp = buf.get_u32_le();
31211        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
31212            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31213                flag_type: "MavWinchStatusFlag",
31214                value: tmp as u32,
31215            })?;
31216        __struct.temperature = buf.get_i16_le();
31217        Ok(__struct)
31218    }
31219    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31220        let mut __tmp = BytesMut::new(bytes);
31221        #[allow(clippy::absurd_extreme_comparisons)]
31222        #[allow(unused_comparisons)]
31223        if __tmp.remaining() < Self::ENCODED_LEN {
31224            panic!(
31225                "buffer is too small (need {} bytes, but got {})",
31226                Self::ENCODED_LEN,
31227                __tmp.remaining(),
31228            )
31229        }
31230        __tmp.put_u64_le(self.time_usec);
31231        __tmp.put_f32_le(self.line_length);
31232        __tmp.put_f32_le(self.speed);
31233        __tmp.put_f32_le(self.tension);
31234        __tmp.put_f32_le(self.voltage);
31235        __tmp.put_f32_le(self.current);
31236        __tmp.put_u32_le(self.status.bits());
31237        __tmp.put_i16_le(self.temperature);
31238        if matches!(version, MavlinkVersion::V2) {
31239            let len = __tmp.len();
31240            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31241        } else {
31242            __tmp.len()
31243        }
31244    }
31245}
31246#[doc = "id: 231"]
31247#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
31248#[derive(Debug, Clone, PartialEq)]
31249#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31250#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31251pub struct WIND_COV_DATA {
31252    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31253    pub time_usec: u64,
31254    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
31255    pub wind_x: f32,
31256    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
31257    pub wind_y: f32,
31258    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
31259    pub wind_z: f32,
31260    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31261    pub var_horiz: f32,
31262    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31263    pub var_vert: f32,
31264    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
31265    pub wind_alt: f32,
31266    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
31267    pub horiz_accuracy: f32,
31268    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
31269    pub vert_accuracy: f32,
31270}
31271impl WIND_COV_DATA {
31272    pub const ENCODED_LEN: usize = 40usize;
31273    pub const DEFAULT: Self = Self {
31274        time_usec: 0_u64,
31275        wind_x: 0.0_f32,
31276        wind_y: 0.0_f32,
31277        wind_z: 0.0_f32,
31278        var_horiz: 0.0_f32,
31279        var_vert: 0.0_f32,
31280        wind_alt: 0.0_f32,
31281        horiz_accuracy: 0.0_f32,
31282        vert_accuracy: 0.0_f32,
31283    };
31284    #[cfg(feature = "arbitrary")]
31285    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31286        use arbitrary::{Arbitrary, Unstructured};
31287        let mut buf = [0u8; 1024];
31288        rng.fill_bytes(&mut buf);
31289        let mut unstructured = Unstructured::new(&buf);
31290        Self::arbitrary(&mut unstructured).unwrap_or_default()
31291    }
31292}
31293impl Default for WIND_COV_DATA {
31294    fn default() -> Self {
31295        Self::DEFAULT.clone()
31296    }
31297}
31298impl MessageData for WIND_COV_DATA {
31299    type Message = MavMessage;
31300    const ID: u32 = 231u32;
31301    const NAME: &'static str = "WIND_COV";
31302    const EXTRA_CRC: u8 = 105u8;
31303    const ENCODED_LEN: usize = 40usize;
31304    fn deser(
31305        _version: MavlinkVersion,
31306        __input: &[u8],
31307    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31308        let avail_len = __input.len();
31309        let mut payload_buf = [0; Self::ENCODED_LEN];
31310        let mut buf = if avail_len < Self::ENCODED_LEN {
31311            payload_buf[0..avail_len].copy_from_slice(__input);
31312            Bytes::new(&payload_buf)
31313        } else {
31314            Bytes::new(__input)
31315        };
31316        let mut __struct = Self::default();
31317        __struct.time_usec = buf.get_u64_le();
31318        __struct.wind_x = buf.get_f32_le();
31319        __struct.wind_y = buf.get_f32_le();
31320        __struct.wind_z = buf.get_f32_le();
31321        __struct.var_horiz = buf.get_f32_le();
31322        __struct.var_vert = buf.get_f32_le();
31323        __struct.wind_alt = buf.get_f32_le();
31324        __struct.horiz_accuracy = buf.get_f32_le();
31325        __struct.vert_accuracy = buf.get_f32_le();
31326        Ok(__struct)
31327    }
31328    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31329        let mut __tmp = BytesMut::new(bytes);
31330        #[allow(clippy::absurd_extreme_comparisons)]
31331        #[allow(unused_comparisons)]
31332        if __tmp.remaining() < Self::ENCODED_LEN {
31333            panic!(
31334                "buffer is too small (need {} bytes, but got {})",
31335                Self::ENCODED_LEN,
31336                __tmp.remaining(),
31337            )
31338        }
31339        __tmp.put_u64_le(self.time_usec);
31340        __tmp.put_f32_le(self.wind_x);
31341        __tmp.put_f32_le(self.wind_y);
31342        __tmp.put_f32_le(self.wind_z);
31343        __tmp.put_f32_le(self.var_horiz);
31344        __tmp.put_f32_le(self.var_vert);
31345        __tmp.put_f32_le(self.wind_alt);
31346        __tmp.put_f32_le(self.horiz_accuracy);
31347        __tmp.put_f32_le(self.vert_accuracy);
31348        if matches!(version, MavlinkVersion::V2) {
31349            let len = __tmp.len();
31350            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31351        } else {
31352            __tmp.len()
31353        }
31354    }
31355}
31356#[derive(Clone, PartialEq, Debug)]
31357#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31358#[cfg_attr(feature = "serde", serde(tag = "type"))]
31359#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31360#[repr(u32)]
31361pub enum MavMessage {
31362    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
31363    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
31364    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
31365    AIS_VESSEL(AIS_VESSEL_DATA),
31366    ALTITUDE(ALTITUDE_DATA),
31367    ATTITUDE(ATTITUDE_DATA),
31368    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
31369    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
31370    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
31371    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
31372    AUTH_KEY(AUTH_KEY_DATA),
31373    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
31374    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
31375    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
31376    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
31377    BATTERY_INFO(BATTERY_INFO_DATA),
31378    BATTERY_STATUS(BATTERY_STATUS_DATA),
31379    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
31380    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
31381    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
31382    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
31383    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
31384    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
31385    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
31386    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
31387    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
31388    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
31389    CANFD_FRAME(CANFD_FRAME_DATA),
31390    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
31391    CAN_FRAME(CAN_FRAME_DATA),
31392    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
31393    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
31394    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
31395    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
31396    COLLISION(COLLISION_DATA),
31397    COMMAND_ACK(COMMAND_ACK_DATA),
31398    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
31399    COMMAND_INT(COMMAND_INT_DATA),
31400    COMMAND_LONG(COMMAND_LONG_DATA),
31401    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
31402    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
31403    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
31404    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
31405    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
31406    CUBEPILOT_FIRMWARE_UPDATE_RESP(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA),
31407    CUBEPILOT_FIRMWARE_UPDATE_START(CUBEPILOT_FIRMWARE_UPDATE_START_DATA),
31408    CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA),
31409    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
31410    CURRENT_MODE(CURRENT_MODE_DATA),
31411    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
31412    DATA_STREAM(DATA_STREAM_DATA),
31413    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
31414    DEBUG(DEBUG_DATA),
31415    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
31416    DEBUG_VECT(DEBUG_VECT_DATA),
31417    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
31418    EFI_STATUS(EFI_STATUS_DATA),
31419    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
31420    ESC_INFO(ESC_INFO_DATA),
31421    ESC_STATUS(ESC_STATUS_DATA),
31422    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
31423    EVENT(EVENT_DATA),
31424    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
31425    FENCE_STATUS(FENCE_STATUS_DATA),
31426    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
31427    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
31428    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
31429    FUEL_STATUS(FUEL_STATUS_DATA),
31430    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
31431    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
31432    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
31433    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
31434    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
31435    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
31436    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
31437    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
31438    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
31439    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
31440    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
31441    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
31442    GPS2_RAW(GPS2_RAW_DATA),
31443    GPS2_RTK(GPS2_RTK_DATA),
31444    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
31445    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
31446    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
31447    GPS_INPUT(GPS_INPUT_DATA),
31448    GPS_RAW_INT(GPS_RAW_INT_DATA),
31449    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
31450    GPS_RTK(GPS_RTK_DATA),
31451    GPS_STATUS(GPS_STATUS_DATA),
31452    HEARTBEAT(HEARTBEAT_DATA),
31453    HERELINK_TELEM(HERELINK_TELEM_DATA),
31454    HERELINK_VIDEO_STREAM_INFORMATION(HERELINK_VIDEO_STREAM_INFORMATION_DATA),
31455    HIGHRES_IMU(HIGHRES_IMU_DATA),
31456    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
31457    HIGH_LATENCY(HIGH_LATENCY_DATA),
31458    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
31459    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
31460    HIL_CONTROLS(HIL_CONTROLS_DATA),
31461    HIL_GPS(HIL_GPS_DATA),
31462    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
31463    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
31464    HIL_SENSOR(HIL_SENSOR_DATA),
31465    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
31466    HIL_STATE(HIL_STATE_DATA),
31467    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
31468    HOME_POSITION(HOME_POSITION_DATA),
31469    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
31470    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
31471    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
31472    LANDING_TARGET(LANDING_TARGET_DATA),
31473    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
31474    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
31475    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
31476    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
31477    LOGGING_ACK(LOGGING_ACK_DATA),
31478    LOGGING_DATA(LOGGING_DATA_DATA),
31479    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
31480    LOG_DATA(LOG_DATA_DATA),
31481    LOG_ENTRY(LOG_ENTRY_DATA),
31482    LOG_ERASE(LOG_ERASE_DATA),
31483    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
31484    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
31485    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
31486    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
31487    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
31488    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
31489    MEMORY_VECT(MEMORY_VECT_DATA),
31490    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
31491    MISSION_ACK(MISSION_ACK_DATA),
31492    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
31493    MISSION_COUNT(MISSION_COUNT_DATA),
31494    MISSION_CURRENT(MISSION_CURRENT_DATA),
31495    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
31496    MISSION_ITEM(MISSION_ITEM_DATA),
31497    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
31498    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
31499    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
31500    MISSION_REQUEST(MISSION_REQUEST_DATA),
31501    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
31502    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
31503    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
31504    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
31505    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
31506    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
31507    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
31508    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
31509    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
31510    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
31511    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
31512    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
31513    ODOMETRY(ODOMETRY_DATA),
31514    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
31515    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
31516    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
31517    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
31518    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
31519    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
31520    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
31521    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
31522    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
31523    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
31524    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
31525    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
31526    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
31527    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
31528    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
31529    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
31530    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
31531    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
31532    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
31533    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
31534    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
31535    PARAM_SET(PARAM_SET_DATA),
31536    PARAM_VALUE(PARAM_VALUE_DATA),
31537    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
31538    PING(PING_DATA),
31539    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
31540    PLAY_TUNE(PLAY_TUNE_DATA),
31541    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
31542    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
31543    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
31544    POWER_STATUS(POWER_STATUS_DATA),
31545    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
31546    RADIO_STATUS(RADIO_STATUS_DATA),
31547    RAW_IMU(RAW_IMU_DATA),
31548    RAW_PRESSURE(RAW_PRESSURE_DATA),
31549    RAW_RPM(RAW_RPM_DATA),
31550    RC_CHANNELS(RC_CHANNELS_DATA),
31551    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
31552    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
31553    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
31554    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
31555    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
31556    REQUEST_EVENT(REQUEST_EVENT_DATA),
31557    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
31558    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
31559    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
31560    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
31561    SCALED_IMU(SCALED_IMU_DATA),
31562    SCALED_IMU2(SCALED_IMU2_DATA),
31563    SCALED_IMU3(SCALED_IMU3_DATA),
31564    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
31565    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
31566    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
31567    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
31568    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
31569    SETUP_SIGNING(SETUP_SIGNING_DATA),
31570    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
31571    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
31572    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
31573    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
31574    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
31575    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
31576    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
31577    SET_MODE(SET_MODE_DATA),
31578    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
31579    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
31580    SIM_STATE(SIM_STATE_DATA),
31581    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
31582    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
31583    STATUSTEXT(STATUSTEXT_DATA),
31584    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
31585    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
31586    SYSTEM_TIME(SYSTEM_TIME_DATA),
31587    SYS_STATUS(SYS_STATUS_DATA),
31588    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
31589    TERRAIN_DATA(TERRAIN_DATA_DATA),
31590    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
31591    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
31592    TIMESYNC(TIMESYNC_DATA),
31593    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
31594    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
31595    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
31596    TUNNEL(TUNNEL_DATA),
31597    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
31598    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
31599    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
31600    V2_EXTENSION(V2_EXTENSION_DATA),
31601    VFR_HUD(VFR_HUD_DATA),
31602    VIBRATION(VIBRATION_DATA),
31603    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
31604    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
31605    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
31606    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
31607    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
31608    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
31609    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
31610    WINCH_STATUS(WINCH_STATUS_DATA),
31611    WIND_COV(WIND_COV_DATA),
31612}
31613impl MavMessage {
31614    pub const fn all_ids() -> &'static [u32] {
31615        &[
31616            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
31617            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
31618            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
31619            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
31620            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
31621            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
31622            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
31623            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
31624            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
31625            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
31626            148u32, 149u32, 162u32, 192u32, 225u32, 230u32, 231u32, 232u32, 233u32, 234u32, 235u32,
31627            241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32, 249u32, 250u32, 251u32,
31628            252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32, 261u32, 262u32, 263u32,
31629            264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32, 275u32, 276u32, 277u32,
31630            280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32, 288u32, 290u32, 291u32,
31631            299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32, 323u32, 324u32, 330u32,
31632            331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32, 350u32, 360u32, 370u32,
31633            371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32, 388u32, 390u32, 395u32,
31634            396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32, 435u32, 436u32, 437u32,
31635            440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32, 12903u32, 12904u32, 12905u32,
31636            12915u32, 12918u32, 12919u32, 12920u32, 50001u32, 50002u32, 50003u32, 50004u32,
31637            50005u32,
31638        ]
31639    }
31640}
31641impl Message for MavMessage {
31642    fn parse(
31643        version: MavlinkVersion,
31644        id: u32,
31645        payload: &[u8],
31646    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31647        match id {
31648            ACTUATOR_CONTROL_TARGET_DATA::ID => {
31649                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31650                    .map(Self::ACTUATOR_CONTROL_TARGET)
31651            }
31652            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
31653                .map(Self::ACTUATOR_OUTPUT_STATUS),
31654            ADSB_VEHICLE_DATA::ID => {
31655                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
31656            }
31657            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
31658            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
31659            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
31660            ATTITUDE_QUATERNION_DATA::ID => {
31661                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
31662            }
31663            ATTITUDE_QUATERNION_COV_DATA::ID => {
31664                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
31665                    .map(Self::ATTITUDE_QUATERNION_COV)
31666            }
31667            ATTITUDE_TARGET_DATA::ID => {
31668                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
31669            }
31670            ATT_POS_MOCAP_DATA::ID => {
31671                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
31672            }
31673            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
31674            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
31675                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
31676                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
31677            }
31678            AUTOPILOT_VERSION_DATA::ID => {
31679                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
31680            }
31681            AVAILABLE_MODES_DATA::ID => {
31682                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
31683            }
31684            AVAILABLE_MODES_MONITOR_DATA::ID => {
31685                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
31686                    .map(Self::AVAILABLE_MODES_MONITOR)
31687            }
31688            BATTERY_INFO_DATA::ID => {
31689                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
31690            }
31691            BATTERY_STATUS_DATA::ID => {
31692                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
31693            }
31694            BUTTON_CHANGE_DATA::ID => {
31695                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
31696            }
31697            CAMERA_CAPTURE_STATUS_DATA::ID => {
31698                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
31699            }
31700            CAMERA_FOV_STATUS_DATA::ID => {
31701                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
31702            }
31703            CAMERA_IMAGE_CAPTURED_DATA::ID => {
31704                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
31705            }
31706            CAMERA_INFORMATION_DATA::ID => {
31707                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
31708            }
31709            CAMERA_SETTINGS_DATA::ID => {
31710                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
31711            }
31712            CAMERA_THERMAL_RANGE_DATA::ID => {
31713                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
31714            }
31715            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
31716                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
31717                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
31718            }
31719            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
31720                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
31721                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
31722            }
31723            CAMERA_TRIGGER_DATA::ID => {
31724                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
31725            }
31726            CANFD_FRAME_DATA::ID => {
31727                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
31728            }
31729            CAN_FILTER_MODIFY_DATA::ID => {
31730                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
31731            }
31732            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
31733            CELLULAR_CONFIG_DATA::ID => {
31734                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
31735            }
31736            CELLULAR_STATUS_DATA::ID => {
31737                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
31738            }
31739            CHANGE_OPERATOR_CONTROL_DATA::ID => {
31740                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
31741                    .map(Self::CHANGE_OPERATOR_CONTROL)
31742            }
31743            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
31744                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
31745                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
31746            }
31747            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
31748            COMMAND_ACK_DATA::ID => {
31749                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
31750            }
31751            COMMAND_CANCEL_DATA::ID => {
31752                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
31753            }
31754            COMMAND_INT_DATA::ID => {
31755                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
31756            }
31757            COMMAND_LONG_DATA::ID => {
31758                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
31759            }
31760            COMPONENT_INFORMATION_DATA::ID => {
31761                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
31762            }
31763            COMPONENT_INFORMATION_BASIC_DATA::ID => {
31764                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
31765                    .map(Self::COMPONENT_INFORMATION_BASIC)
31766            }
31767            COMPONENT_METADATA_DATA::ID => {
31768                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
31769            }
31770            CONTROL_SYSTEM_STATE_DATA::ID => {
31771                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
31772            }
31773            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
31774                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::deser(version, payload)
31775                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP)
31776            }
31777            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
31778                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::deser(version, payload)
31779                    .map(Self::CUBEPILOT_FIRMWARE_UPDATE_START)
31780            }
31781            CUBEPILOT_RAW_RC_DATA::ID => {
31782                CUBEPILOT_RAW_RC_DATA::deser(version, payload).map(Self::CUBEPILOT_RAW_RC)
31783            }
31784            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
31785                .map(Self::CURRENT_EVENT_SEQUENCE),
31786            CURRENT_MODE_DATA::ID => {
31787                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
31788            }
31789            DATA_STREAM_DATA::ID => {
31790                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
31791            }
31792            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
31793                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
31794                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
31795            }
31796            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
31797            DEBUG_FLOAT_ARRAY_DATA::ID => {
31798                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
31799            }
31800            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
31801            DISTANCE_SENSOR_DATA::ID => {
31802                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
31803            }
31804            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
31805            ENCAPSULATED_DATA_DATA::ID => {
31806                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
31807            }
31808            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
31809            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
31810            ESTIMATOR_STATUS_DATA::ID => {
31811                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
31812            }
31813            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
31814            EXTENDED_SYS_STATE_DATA::ID => {
31815                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
31816            }
31817            FENCE_STATUS_DATA::ID => {
31818                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
31819            }
31820            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
31821                .map(Self::FILE_TRANSFER_PROTOCOL),
31822            FLIGHT_INFORMATION_DATA::ID => {
31823                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
31824            }
31825            FOLLOW_TARGET_DATA::ID => {
31826                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
31827            }
31828            FUEL_STATUS_DATA::ID => {
31829                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
31830            }
31831            GENERATOR_STATUS_DATA::ID => {
31832                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
31833            }
31834            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
31835                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
31836                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
31837            }
31838            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
31839                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
31840                    .map(Self::GIMBAL_DEVICE_INFORMATION)
31841            }
31842            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
31843                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
31844                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
31845            }
31846            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
31847                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
31848                    .map(Self::GIMBAL_MANAGER_INFORMATION)
31849            }
31850            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
31851                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
31852                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
31853            }
31854            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
31855                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
31856                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
31857            }
31858            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
31859                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
31860                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
31861            }
31862            GIMBAL_MANAGER_STATUS_DATA::ID => {
31863                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
31864            }
31865            GLOBAL_POSITION_INT_DATA::ID => {
31866                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
31867            }
31868            GLOBAL_POSITION_INT_COV_DATA::ID => {
31869                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
31870                    .map(Self::GLOBAL_POSITION_INT_COV)
31871            }
31872            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
31873                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
31874                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
31875            }
31876            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
31877            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
31878            GPS_GLOBAL_ORIGIN_DATA::ID => {
31879                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
31880            }
31881            GPS_INJECT_DATA_DATA::ID => {
31882                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
31883            }
31884            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
31885            GPS_RAW_INT_DATA::ID => {
31886                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
31887            }
31888            GPS_RTCM_DATA_DATA::ID => {
31889                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
31890            }
31891            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
31892            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
31893            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
31894            HERELINK_TELEM_DATA::ID => {
31895                HERELINK_TELEM_DATA::deser(version, payload).map(Self::HERELINK_TELEM)
31896            }
31897            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
31898                HERELINK_VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
31899                    .map(Self::HERELINK_VIDEO_STREAM_INFORMATION)
31900            }
31901            HIGHRES_IMU_DATA::ID => {
31902                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
31903            }
31904            HIGH_LATENCY_DATA::ID => {
31905                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
31906            }
31907            HIGH_LATENCY2_DATA::ID => {
31908                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
31909            }
31910            HIL_ACTUATOR_CONTROLS_DATA::ID => {
31911                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
31912            }
31913            HIL_CONTROLS_DATA::ID => {
31914                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
31915            }
31916            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
31917            HIL_OPTICAL_FLOW_DATA::ID => {
31918                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
31919            }
31920            HIL_RC_INPUTS_RAW_DATA::ID => {
31921                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
31922            }
31923            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
31924            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
31925            HIL_STATE_QUATERNION_DATA::ID => {
31926                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
31927            }
31928            HOME_POSITION_DATA::ID => {
31929                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
31930            }
31931            HYGROMETER_SENSOR_DATA::ID => {
31932                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
31933            }
31934            ILLUMINATOR_STATUS_DATA::ID => {
31935                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
31936            }
31937            ISBD_LINK_STATUS_DATA::ID => {
31938                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
31939            }
31940            LANDING_TARGET_DATA::ID => {
31941                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
31942            }
31943            LINK_NODE_STATUS_DATA::ID => {
31944                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
31945            }
31946            LOCAL_POSITION_NED_DATA::ID => {
31947                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
31948            }
31949            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
31950                .map(Self::LOCAL_POSITION_NED_COV),
31951            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
31952                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
31953                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
31954            }
31955            LOGGING_ACK_DATA::ID => {
31956                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
31957            }
31958            LOGGING_DATA_DATA::ID => {
31959                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
31960            }
31961            LOGGING_DATA_ACKED_DATA::ID => {
31962                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
31963            }
31964            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
31965            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
31966            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
31967            LOG_REQUEST_DATA_DATA::ID => {
31968                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
31969            }
31970            LOG_REQUEST_END_DATA::ID => {
31971                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
31972            }
31973            LOG_REQUEST_LIST_DATA::ID => {
31974                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
31975            }
31976            MAG_CAL_REPORT_DATA::ID => {
31977                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
31978            }
31979            MANUAL_CONTROL_DATA::ID => {
31980                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
31981            }
31982            MANUAL_SETPOINT_DATA::ID => {
31983                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
31984            }
31985            MEMORY_VECT_DATA::ID => {
31986                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
31987            }
31988            MESSAGE_INTERVAL_DATA::ID => {
31989                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
31990            }
31991            MISSION_ACK_DATA::ID => {
31992                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
31993            }
31994            MISSION_CLEAR_ALL_DATA::ID => {
31995                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
31996            }
31997            MISSION_COUNT_DATA::ID => {
31998                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
31999            }
32000            MISSION_CURRENT_DATA::ID => {
32001                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
32002            }
32003            MISSION_ITEM_DATA::ID => {
32004                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
32005            }
32006            MISSION_ITEM_INT_DATA::ID => {
32007                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
32008            }
32009            MISSION_ITEM_REACHED_DATA::ID => {
32010                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
32011            }
32012            MISSION_REQUEST_DATA::ID => {
32013                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
32014            }
32015            MISSION_REQUEST_INT_DATA::ID => {
32016                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
32017            }
32018            MISSION_REQUEST_LIST_DATA::ID => {
32019                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
32020            }
32021            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
32022                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
32023                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
32024            }
32025            MISSION_SET_CURRENT_DATA::ID => {
32026                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
32027            }
32028            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
32029                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
32030                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
32031            }
32032            MOUNT_ORIENTATION_DATA::ID => {
32033                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
32034            }
32035            NAMED_VALUE_FLOAT_DATA::ID => {
32036                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
32037            }
32038            NAMED_VALUE_INT_DATA::ID => {
32039                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
32040            }
32041            NAV_CONTROLLER_OUTPUT_DATA::ID => {
32042                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
32043            }
32044            OBSTACLE_DISTANCE_DATA::ID => {
32045                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
32046            }
32047            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
32048            ONBOARD_COMPUTER_STATUS_DATA::ID => {
32049                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
32050                    .map(Self::ONBOARD_COMPUTER_STATUS)
32051            }
32052            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
32053                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
32054                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
32055            }
32056            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
32057                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
32058                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
32059            }
32060            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
32061                .map(Self::OPEN_DRONE_ID_BASIC_ID),
32062            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
32063                .map(Self::OPEN_DRONE_ID_LOCATION),
32064            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
32065                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
32066                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
32067            }
32068            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
32069                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
32070                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
32071            }
32072            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
32073                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
32074            }
32075            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
32076                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
32077            }
32078            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
32079                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
32080                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
32081            }
32082            OPTICAL_FLOW_DATA::ID => {
32083                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
32084            }
32085            OPTICAL_FLOW_RAD_DATA::ID => {
32086                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
32087            }
32088            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
32089                .map(Self::ORBIT_EXECUTION_STATUS),
32090            PARAM_EXT_ACK_DATA::ID => {
32091                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
32092            }
32093            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
32094                .map(Self::PARAM_EXT_REQUEST_LIST),
32095            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
32096                .map(Self::PARAM_EXT_REQUEST_READ),
32097            PARAM_EXT_SET_DATA::ID => {
32098                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
32099            }
32100            PARAM_EXT_VALUE_DATA::ID => {
32101                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
32102            }
32103            PARAM_MAP_RC_DATA::ID => {
32104                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
32105            }
32106            PARAM_REQUEST_LIST_DATA::ID => {
32107                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
32108            }
32109            PARAM_REQUEST_READ_DATA::ID => {
32110                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
32111            }
32112            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
32113            PARAM_VALUE_DATA::ID => {
32114                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
32115            }
32116            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
32117            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
32118            PLAY_TUNE_V2_DATA::ID => {
32119                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
32120            }
32121            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32122                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32123                    .map(Self::POSITION_TARGET_GLOBAL_INT)
32124            }
32125            POSITION_TARGET_LOCAL_NED_DATA::ID => {
32126                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32127                    .map(Self::POSITION_TARGET_LOCAL_NED)
32128            }
32129            POWER_STATUS_DATA::ID => {
32130                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
32131            }
32132            PROTOCOL_VERSION_DATA::ID => {
32133                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
32134            }
32135            RADIO_STATUS_DATA::ID => {
32136                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
32137            }
32138            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
32139            RAW_PRESSURE_DATA::ID => {
32140                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
32141            }
32142            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
32143            RC_CHANNELS_DATA::ID => {
32144                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
32145            }
32146            RC_CHANNELS_OVERRIDE_DATA::ID => {
32147                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
32148            }
32149            RC_CHANNELS_RAW_DATA::ID => {
32150                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
32151            }
32152            RC_CHANNELS_SCALED_DATA::ID => {
32153                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
32154            }
32155            REQUEST_DATA_STREAM_DATA::ID => {
32156                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
32157            }
32158            REQUEST_EVENT_DATA::ID => {
32159                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
32160            }
32161            RESOURCE_REQUEST_DATA::ID => {
32162                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
32163            }
32164            RESPONSE_EVENT_ERROR_DATA::ID => {
32165                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
32166            }
32167            SAFETY_ALLOWED_AREA_DATA::ID => {
32168                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
32169            }
32170            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
32171                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
32172                    .map(Self::SAFETY_SET_ALLOWED_AREA)
32173            }
32174            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
32175            SCALED_IMU2_DATA::ID => {
32176                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
32177            }
32178            SCALED_IMU3_DATA::ID => {
32179                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
32180            }
32181            SCALED_PRESSURE_DATA::ID => {
32182                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
32183            }
32184            SCALED_PRESSURE2_DATA::ID => {
32185                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
32186            }
32187            SCALED_PRESSURE3_DATA::ID => {
32188                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
32189            }
32190            SERIAL_CONTROL_DATA::ID => {
32191                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
32192            }
32193            SERVO_OUTPUT_RAW_DATA::ID => {
32194                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
32195            }
32196            SETUP_SIGNING_DATA::ID => {
32197                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
32198            }
32199            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
32200                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
32201                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
32202            }
32203            SET_ATTITUDE_TARGET_DATA::ID => {
32204                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
32205            }
32206            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
32207                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
32208            }
32209            SET_HOME_POSITION_DATA::ID => {
32210                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
32211            }
32212            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
32213            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32214                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32215                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
32216            }
32217            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
32218                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32219                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
32220            }
32221            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
32222            SMART_BATTERY_INFO_DATA::ID => {
32223                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
32224            }
32225            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
32226            STORAGE_INFORMATION_DATA::ID => {
32227                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
32228            }
32229            SUPPORTED_TUNES_DATA::ID => {
32230                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
32231            }
32232            SYSTEM_TIME_DATA::ID => {
32233                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
32234            }
32235            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
32236            TERRAIN_CHECK_DATA::ID => {
32237                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
32238            }
32239            TERRAIN_DATA_DATA::ID => {
32240                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
32241            }
32242            TERRAIN_REPORT_DATA::ID => {
32243                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
32244            }
32245            TERRAIN_REQUEST_DATA::ID => {
32246                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
32247            }
32248            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
32249            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
32250                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
32251                    .map(Self::TIME_ESTIMATE_TO_TARGET)
32252            }
32253            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
32254                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
32255                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
32256            }
32257            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
32258                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
32259                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
32260            }
32261            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
32262            UAVCAN_NODE_INFO_DATA::ID => {
32263                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
32264            }
32265            UAVCAN_NODE_STATUS_DATA::ID => {
32266                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
32267            }
32268            UTM_GLOBAL_POSITION_DATA::ID => {
32269                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
32270            }
32271            V2_EXTENSION_DATA::ID => {
32272                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
32273            }
32274            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
32275            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
32276            VICON_POSITION_ESTIMATE_DATA::ID => {
32277                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
32278                    .map(Self::VICON_POSITION_ESTIMATE)
32279            }
32280            VIDEO_STREAM_INFORMATION_DATA::ID => {
32281                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
32282                    .map(Self::VIDEO_STREAM_INFORMATION)
32283            }
32284            VIDEO_STREAM_STATUS_DATA::ID => {
32285                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
32286            }
32287            VISION_POSITION_ESTIMATE_DATA::ID => {
32288                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32289                    .map(Self::VISION_POSITION_ESTIMATE)
32290            }
32291            VISION_SPEED_ESTIMATE_DATA::ID => {
32292                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
32293            }
32294            WHEEL_DISTANCE_DATA::ID => {
32295                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
32296            }
32297            WIFI_CONFIG_AP_DATA::ID => {
32298                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
32299            }
32300            WINCH_STATUS_DATA::ID => {
32301                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
32302            }
32303            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
32304            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
32305        }
32306    }
32307    fn message_name(&self) -> &'static str {
32308        match self {
32309            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
32310            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
32311            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
32312            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
32313            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
32314            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
32315            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
32316            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
32317            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
32318            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
32319            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
32320            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32321                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
32322            }
32323            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
32324            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
32325            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
32326            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
32327            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
32328            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
32329            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
32330            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
32331            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
32332            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
32333            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
32334            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
32335            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
32336            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
32337            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
32338            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
32339            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
32340            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
32341            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
32342            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
32343            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
32344            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
32345            Self::COLLISION(..) => COLLISION_DATA::NAME,
32346            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
32347            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
32348            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
32349            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
32350            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
32351            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
32352            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
32353            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
32354            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME,
32355            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME,
32356            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::NAME,
32357            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
32358            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
32359            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
32360            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
32361            Self::DEBUG(..) => DEBUG_DATA::NAME,
32362            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
32363            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
32364            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
32365            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
32366            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
32367            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
32368            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
32369            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
32370            Self::EVENT(..) => EVENT_DATA::NAME,
32371            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
32372            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
32373            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
32374            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
32375            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
32376            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
32377            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
32378            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
32379            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
32380            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
32381            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
32382            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
32383            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32384                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
32385            }
32386            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
32387            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
32388            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
32389            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
32390            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
32391            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
32392            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
32393            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
32394            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
32395            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
32396            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
32397            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
32398            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
32399            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
32400            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
32401            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::NAME,
32402            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
32403                HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME
32404            }
32405            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
32406            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
32407            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
32408            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
32409            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
32410            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
32411            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
32412            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
32413            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
32414            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
32415            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
32416            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
32417            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
32418            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
32419            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
32420            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
32421            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
32422            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
32423            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
32424            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32425                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
32426            }
32427            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
32428            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
32429            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
32430            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
32431            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
32432            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
32433            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
32434            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
32435            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
32436            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
32437            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
32438            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
32439            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
32440            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
32441            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
32442            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
32443            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
32444            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
32445            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
32446            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
32447            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
32448            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
32449            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
32450            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
32451            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
32452            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
32453            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
32454            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
32455            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
32456            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
32457            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
32458            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
32459            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
32460            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
32461            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
32462            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
32463            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
32464            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
32465            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
32466            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
32467            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
32468            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
32469            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
32470            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
32471            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
32472            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
32473            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
32474            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
32475            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
32476            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
32477            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
32478            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
32479            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
32480            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
32481            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
32482            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
32483            Self::PING(..) => PING_DATA::NAME,
32484            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
32485            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
32486            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32487            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
32488            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
32489            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
32490            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
32491            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
32492            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
32493            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
32494            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
32495            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
32496            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
32497            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
32498            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
32499            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
32500            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
32501            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
32502            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
32503            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
32504            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
32505            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
32506            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
32507            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
32508            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
32509            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
32510            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
32511            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
32512            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
32513            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
32514            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
32515            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
32516            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
32517            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
32518            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32519            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
32520            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
32521            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
32522            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
32523            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
32524            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
32525            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
32526            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
32527            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
32528            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
32529            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
32530            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
32531            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
32532            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
32533            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
32534                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
32535            }
32536            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32537                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
32538            }
32539            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
32540            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
32541            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
32542            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
32543            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
32544            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
32545            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
32546            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
32547            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
32548            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
32549            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
32550            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
32551            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
32552            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
32553            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
32554            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
32555        }
32556    }
32557    fn message_id(&self) -> u32 {
32558        match self {
32559            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
32560            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
32561            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
32562            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
32563            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
32564            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
32565            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
32566            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
32567            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
32568            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
32569            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
32570            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32571                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
32572            }
32573            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
32574            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
32575            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
32576            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
32577            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
32578            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
32579            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
32580            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
32581            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
32582            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
32583            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
32584            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
32585            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
32586            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
32587            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
32588            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
32589            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
32590            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
32591            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
32592            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
32593            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
32594            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
32595            Self::COLLISION(..) => COLLISION_DATA::ID,
32596            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
32597            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
32598            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
32599            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
32600            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
32601            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
32602            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
32603            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
32604            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(..) => CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID,
32605            Self::CUBEPILOT_FIRMWARE_UPDATE_START(..) => CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID,
32606            Self::CUBEPILOT_RAW_RC(..) => CUBEPILOT_RAW_RC_DATA::ID,
32607            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
32608            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
32609            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
32610            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
32611            Self::DEBUG(..) => DEBUG_DATA::ID,
32612            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
32613            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
32614            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
32615            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
32616            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
32617            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
32618            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
32619            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
32620            Self::EVENT(..) => EVENT_DATA::ID,
32621            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
32622            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
32623            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
32624            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
32625            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
32626            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
32627            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
32628            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
32629            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
32630            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
32631            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
32632            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
32633            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32634                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
32635            }
32636            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
32637            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
32638            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
32639            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
32640            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
32641            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
32642            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
32643            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
32644            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
32645            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
32646            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
32647            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
32648            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
32649            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
32650            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
32651            Self::HERELINK_TELEM(..) => HERELINK_TELEM_DATA::ID,
32652            Self::HERELINK_VIDEO_STREAM_INFORMATION(..) => {
32653                HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID
32654            }
32655            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
32656            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
32657            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
32658            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
32659            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
32660            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
32661            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
32662            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
32663            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
32664            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
32665            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
32666            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
32667            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
32668            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
32669            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
32670            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
32671            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
32672            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
32673            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
32674            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32675                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
32676            }
32677            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
32678            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
32679            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
32680            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
32681            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
32682            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
32683            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
32684            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
32685            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
32686            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
32687            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
32688            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
32689            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
32690            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
32691            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
32692            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
32693            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
32694            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
32695            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
32696            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
32697            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
32698            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
32699            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
32700            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
32701            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
32702            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
32703            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
32704            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
32705            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
32706            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
32707            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
32708            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
32709            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
32710            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
32711            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
32712            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
32713            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
32714            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
32715            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
32716            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
32717            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
32718            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
32719            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
32720            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
32721            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
32722            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
32723            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
32724            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
32725            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
32726            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
32727            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
32728            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
32729            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
32730            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
32731            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
32732            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
32733            Self::PING(..) => PING_DATA::ID,
32734            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
32735            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
32736            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
32737            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
32738            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
32739            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
32740            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
32741            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
32742            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
32743            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
32744            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
32745            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
32746            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
32747            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
32748            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
32749            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
32750            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
32751            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
32752            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
32753            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
32754            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
32755            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
32756            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
32757            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
32758            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
32759            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
32760            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
32761            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
32762            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
32763            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
32764            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
32765            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
32766            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
32767            Self::SET_MODE(..) => SET_MODE_DATA::ID,
32768            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
32769            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
32770            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
32771            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
32772            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
32773            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
32774            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
32775            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
32776            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
32777            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
32778            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
32779            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
32780            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
32781            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
32782            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
32783            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
32784            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32785                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
32786            }
32787            Self::TUNNEL(..) => TUNNEL_DATA::ID,
32788            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
32789            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
32790            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
32791            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
32792            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
32793            Self::VIBRATION(..) => VIBRATION_DATA::ID,
32794            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
32795            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
32796            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
32797            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
32798            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
32799            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
32800            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
32801            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
32802            Self::WIND_COV(..) => WIND_COV_DATA::ID,
32803        }
32804    }
32805    fn message_id_from_name(name: &str) -> Option<u32> {
32806        match name {
32807            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
32808            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
32809            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
32810            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
32811            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
32812            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
32813            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
32814            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
32815            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
32816            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
32817            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
32818            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
32819                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
32820            }
32821            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
32822            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
32823            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
32824            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
32825            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
32826            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
32827            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
32828            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
32829            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
32830            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
32831            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
32832            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
32833            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
32834            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
32835            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
32836            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
32837            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
32838            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
32839            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
32840            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
32841            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
32842            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
32843            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
32844            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
32845            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
32846            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
32847            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
32848            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
32849            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
32850            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
32851            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
32852            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::NAME => {
32853                Some(CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID)
32854            }
32855            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::NAME => {
32856                Some(CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID)
32857            }
32858            CUBEPILOT_RAW_RC_DATA::NAME => Some(CUBEPILOT_RAW_RC_DATA::ID),
32859            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
32860            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
32861            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
32862            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
32863            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
32864            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
32865            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
32866            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
32867            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
32868            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
32869            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
32870            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
32871            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
32872            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
32873            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
32874            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
32875            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
32876            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
32877            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
32878            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
32879            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
32880            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
32881                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
32882            }
32883            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
32884            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
32885            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
32886            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
32887            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
32888                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
32889            }
32890            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
32891            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
32892            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
32893            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
32894            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
32895                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
32896            }
32897            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
32898            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
32899            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
32900            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
32901            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
32902            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
32903            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
32904            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
32905            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
32906            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
32907            HERELINK_TELEM_DATA::NAME => Some(HERELINK_TELEM_DATA::ID),
32908            HERELINK_VIDEO_STREAM_INFORMATION_DATA::NAME => {
32909                Some(HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID)
32910            }
32911            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
32912            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
32913            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
32914            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
32915            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
32916            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
32917            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
32918            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
32919            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
32920            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
32921            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
32922            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
32923            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
32924            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
32925            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
32926            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
32927            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
32928            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
32929            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
32930            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
32931                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
32932            }
32933            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
32934            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
32935            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
32936            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
32937            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
32938            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
32939            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
32940            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
32941            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
32942            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
32943            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
32944            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
32945            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
32946            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
32947            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
32948            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
32949            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
32950            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
32951            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
32952            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
32953            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
32954            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
32955            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
32956            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
32957            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
32958            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
32959            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
32960            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
32961            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
32962            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
32963            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
32964            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
32965            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
32966            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
32967            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
32968            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
32969            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
32970            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
32971            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
32972            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
32973            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
32974            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
32975            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
32976            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
32977            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
32978            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
32979            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
32980            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
32981            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
32982            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
32983            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
32984            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
32985            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
32986            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
32987            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
32988            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
32989            PING_DATA::NAME => Some(PING_DATA::ID),
32990            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
32991            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
32992            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
32993            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
32994            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
32995            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
32996            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
32997            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
32998            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
32999            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
33000            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
33001            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
33002            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
33003            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
33004            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
33005            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
33006            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
33007            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
33008            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
33009            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
33010            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
33011            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
33012            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
33013            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
33014            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
33015            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
33016            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
33017            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
33018            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
33019            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
33020            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
33021            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
33022            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
33023            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
33024            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
33025                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
33026            }
33027            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
33028                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
33029            }
33030            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
33031            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
33032            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
33033            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
33034            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
33035            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
33036            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
33037            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
33038            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
33039            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
33040            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
33041            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
33042            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
33043            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
33044                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
33045            }
33046            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
33047                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
33048            }
33049            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
33050            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
33051            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
33052            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
33053            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
33054            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
33055            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
33056            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
33057            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
33058            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
33059            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
33060            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
33061            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
33062            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
33063            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
33064            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
33065            _ => None,
33066        }
33067    }
33068    fn default_message_from_id(id: u32) -> Option<Self> {
33069        match id {
33070            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33071                ACTUATOR_CONTROL_TARGET_DATA::default(),
33072            )),
33073            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33074                ACTUATOR_OUTPUT_STATUS_DATA::default(),
33075            )),
33076            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
33077            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
33078            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
33079            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
33080            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33081                ATTITUDE_QUATERNION_DATA::default(),
33082            )),
33083            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33084                ATTITUDE_QUATERNION_COV_DATA::default(),
33085            )),
33086            ATTITUDE_TARGET_DATA::ID => {
33087                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
33088            }
33089            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
33090            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
33091            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33092                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33093                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
33094                ))
33095            }
33096            AUTOPILOT_VERSION_DATA::ID => {
33097                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
33098            }
33099            AVAILABLE_MODES_DATA::ID => {
33100                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
33101            }
33102            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33103                AVAILABLE_MODES_MONITOR_DATA::default(),
33104            )),
33105            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
33106            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
33107            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
33108            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33109                CAMERA_CAPTURE_STATUS_DATA::default(),
33110            )),
33111            CAMERA_FOV_STATUS_DATA::ID => {
33112                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
33113            }
33114            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33115                CAMERA_IMAGE_CAPTURED_DATA::default(),
33116            )),
33117            CAMERA_INFORMATION_DATA::ID => {
33118                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
33119            }
33120            CAMERA_SETTINGS_DATA::ID => {
33121                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
33122            }
33123            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33124                CAMERA_THERMAL_RANGE_DATA::default(),
33125            )),
33126            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33127                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
33128            )),
33129            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33130                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
33131            )),
33132            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
33133            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
33134            CAN_FILTER_MODIFY_DATA::ID => {
33135                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
33136            }
33137            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
33138            CELLULAR_CONFIG_DATA::ID => {
33139                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
33140            }
33141            CELLULAR_STATUS_DATA::ID => {
33142                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
33143            }
33144            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33145                CHANGE_OPERATOR_CONTROL_DATA::default(),
33146            )),
33147            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33148                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
33149            )),
33150            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
33151            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
33152            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
33153            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
33154            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
33155            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33156                COMPONENT_INFORMATION_DATA::default(),
33157            )),
33158            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33159                COMPONENT_INFORMATION_BASIC_DATA::default(),
33160            )),
33161            COMPONENT_METADATA_DATA::ID => {
33162                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
33163            }
33164            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33165                CONTROL_SYSTEM_STATE_DATA::default(),
33166            )),
33167            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
33168                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::default(),
33169            )),
33170            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
33171                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
33172                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::default(),
33173                ))
33174            }
33175            CUBEPILOT_RAW_RC_DATA::ID => {
33176                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::default()))
33177            }
33178            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33179                CURRENT_EVENT_SEQUENCE_DATA::default(),
33180            )),
33181            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
33182            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
33183            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33184                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
33185            )),
33186            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
33187            DEBUG_FLOAT_ARRAY_DATA::ID => {
33188                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
33189            }
33190            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
33191            DISTANCE_SENSOR_DATA::ID => {
33192                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
33193            }
33194            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
33195            ENCAPSULATED_DATA_DATA::ID => {
33196                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
33197            }
33198            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
33199            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
33200            ESTIMATOR_STATUS_DATA::ID => {
33201                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
33202            }
33203            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
33204            EXTENDED_SYS_STATE_DATA::ID => {
33205                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
33206            }
33207            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
33208            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33209                FILE_TRANSFER_PROTOCOL_DATA::default(),
33210            )),
33211            FLIGHT_INFORMATION_DATA::ID => {
33212                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
33213            }
33214            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
33215            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
33216            GENERATOR_STATUS_DATA::ID => {
33217                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
33218            }
33219            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33220                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
33221            )),
33222            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33223                GIMBAL_DEVICE_INFORMATION_DATA::default(),
33224            )),
33225            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33226                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
33227            )),
33228            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33229                GIMBAL_MANAGER_INFORMATION_DATA::default(),
33230            )),
33231            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33232                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
33233            )),
33234            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33235                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33236                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
33237                ))
33238            }
33239            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33240                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
33241            )),
33242            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33243                GIMBAL_MANAGER_STATUS_DATA::default(),
33244            )),
33245            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33246                GLOBAL_POSITION_INT_DATA::default(),
33247            )),
33248            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33249                GLOBAL_POSITION_INT_COV_DATA::default(),
33250            )),
33251            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33252                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33253                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
33254                ))
33255            }
33256            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
33257            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
33258            GPS_GLOBAL_ORIGIN_DATA::ID => {
33259                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
33260            }
33261            GPS_INJECT_DATA_DATA::ID => {
33262                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
33263            }
33264            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
33265            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
33266            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
33267            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
33268            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
33269            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
33270            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::default())),
33271            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
33272                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
33273                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::default(),
33274                ))
33275            }
33276            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
33277            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
33278            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
33279            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33280                HIL_ACTUATOR_CONTROLS_DATA::default(),
33281            )),
33282            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
33283            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
33284            HIL_OPTICAL_FLOW_DATA::ID => {
33285                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
33286            }
33287            HIL_RC_INPUTS_RAW_DATA::ID => {
33288                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
33289            }
33290            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
33291            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
33292            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33293                HIL_STATE_QUATERNION_DATA::default(),
33294            )),
33295            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
33296            HYGROMETER_SENSOR_DATA::ID => {
33297                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
33298            }
33299            ILLUMINATOR_STATUS_DATA::ID => {
33300                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
33301            }
33302            ISBD_LINK_STATUS_DATA::ID => {
33303                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
33304            }
33305            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
33306            LINK_NODE_STATUS_DATA::ID => {
33307                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
33308            }
33309            LOCAL_POSITION_NED_DATA::ID => {
33310                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
33311            }
33312            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33313                LOCAL_POSITION_NED_COV_DATA::default(),
33314            )),
33315            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33316                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33317                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
33318                ))
33319            }
33320            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
33321            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
33322            LOGGING_DATA_ACKED_DATA::ID => {
33323                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
33324            }
33325            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
33326            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
33327            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
33328            LOG_REQUEST_DATA_DATA::ID => {
33329                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
33330            }
33331            LOG_REQUEST_END_DATA::ID => {
33332                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
33333            }
33334            LOG_REQUEST_LIST_DATA::ID => {
33335                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
33336            }
33337            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
33338            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
33339            MANUAL_SETPOINT_DATA::ID => {
33340                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
33341            }
33342            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
33343            MESSAGE_INTERVAL_DATA::ID => {
33344                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
33345            }
33346            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
33347            MISSION_CLEAR_ALL_DATA::ID => {
33348                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
33349            }
33350            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
33351            MISSION_CURRENT_DATA::ID => {
33352                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
33353            }
33354            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
33355            MISSION_ITEM_INT_DATA::ID => {
33356                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
33357            }
33358            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33359                MISSION_ITEM_REACHED_DATA::default(),
33360            )),
33361            MISSION_REQUEST_DATA::ID => {
33362                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
33363            }
33364            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33365                MISSION_REQUEST_INT_DATA::default(),
33366            )),
33367            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33368                MISSION_REQUEST_LIST_DATA::default(),
33369            )),
33370            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33371                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
33372            )),
33373            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33374                MISSION_SET_CURRENT_DATA::default(),
33375            )),
33376            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33377                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
33378            )),
33379            MOUNT_ORIENTATION_DATA::ID => {
33380                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
33381            }
33382            NAMED_VALUE_FLOAT_DATA::ID => {
33383                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
33384            }
33385            NAMED_VALUE_INT_DATA::ID => {
33386                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
33387            }
33388            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33389                NAV_CONTROLLER_OUTPUT_DATA::default(),
33390            )),
33391            OBSTACLE_DISTANCE_DATA::ID => {
33392                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
33393            }
33394            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
33395            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33396                ONBOARD_COMPUTER_STATUS_DATA::default(),
33397            )),
33398            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33399                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
33400            )),
33401            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33402                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
33403            )),
33404            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33405                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
33406            )),
33407            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33408                OPEN_DRONE_ID_LOCATION_DATA::default(),
33409            )),
33410            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33411                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
33412            )),
33413            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33414                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
33415            )),
33416            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33417                OPEN_DRONE_ID_SELF_ID_DATA::default(),
33418            )),
33419            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33420                OPEN_DRONE_ID_SYSTEM_DATA::default(),
33421            )),
33422            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33423                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
33424            )),
33425            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
33426            OPTICAL_FLOW_RAD_DATA::ID => {
33427                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
33428            }
33429            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33430                ORBIT_EXECUTION_STATUS_DATA::default(),
33431            )),
33432            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
33433            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33434                PARAM_EXT_REQUEST_LIST_DATA::default(),
33435            )),
33436            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33437                PARAM_EXT_REQUEST_READ_DATA::default(),
33438            )),
33439            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
33440            PARAM_EXT_VALUE_DATA::ID => {
33441                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
33442            }
33443            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
33444            PARAM_REQUEST_LIST_DATA::ID => {
33445                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
33446            }
33447            PARAM_REQUEST_READ_DATA::ID => {
33448                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
33449            }
33450            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
33451            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
33452            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
33453            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
33454            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
33455            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33456                POSITION_TARGET_GLOBAL_INT_DATA::default(),
33457            )),
33458            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33459                POSITION_TARGET_LOCAL_NED_DATA::default(),
33460            )),
33461            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
33462            PROTOCOL_VERSION_DATA::ID => {
33463                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
33464            }
33465            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
33466            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
33467            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
33468            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
33469            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
33470            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33471                RC_CHANNELS_OVERRIDE_DATA::default(),
33472            )),
33473            RC_CHANNELS_RAW_DATA::ID => {
33474                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
33475            }
33476            RC_CHANNELS_SCALED_DATA::ID => {
33477                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
33478            }
33479            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33480                REQUEST_DATA_STREAM_DATA::default(),
33481            )),
33482            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
33483            RESOURCE_REQUEST_DATA::ID => {
33484                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
33485            }
33486            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33487                RESPONSE_EVENT_ERROR_DATA::default(),
33488            )),
33489            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33490                SAFETY_ALLOWED_AREA_DATA::default(),
33491            )),
33492            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33493                SAFETY_SET_ALLOWED_AREA_DATA::default(),
33494            )),
33495            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
33496            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
33497            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
33498            SCALED_PRESSURE_DATA::ID => {
33499                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
33500            }
33501            SCALED_PRESSURE2_DATA::ID => {
33502                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
33503            }
33504            SCALED_PRESSURE3_DATA::ID => {
33505                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
33506            }
33507            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
33508            SERVO_OUTPUT_RAW_DATA::ID => {
33509                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
33510            }
33511            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
33512            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33513                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
33514            )),
33515            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33516                SET_ATTITUDE_TARGET_DATA::default(),
33517            )),
33518            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33519                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
33520            )),
33521            SET_HOME_POSITION_DATA::ID => {
33522                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
33523            }
33524            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
33525            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
33526                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
33527            )),
33528            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
33529                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
33530            )),
33531            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
33532            SMART_BATTERY_INFO_DATA::ID => {
33533                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
33534            }
33535            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
33536            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
33537                STORAGE_INFORMATION_DATA::default(),
33538            )),
33539            SUPPORTED_TUNES_DATA::ID => {
33540                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
33541            }
33542            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
33543            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
33544            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
33545            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
33546            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
33547            TERRAIN_REQUEST_DATA::ID => {
33548                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
33549            }
33550            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
33551            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
33552                TIME_ESTIMATE_TO_TARGET_DATA::default(),
33553            )),
33554            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33555                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
33556                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
33557                ))
33558            }
33559            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33560                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
33561                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
33562                ))
33563            }
33564            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
33565            UAVCAN_NODE_INFO_DATA::ID => {
33566                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
33567            }
33568            UAVCAN_NODE_STATUS_DATA::ID => {
33569                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
33570            }
33571            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
33572                UTM_GLOBAL_POSITION_DATA::default(),
33573            )),
33574            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
33575            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
33576            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
33577            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
33578                VICON_POSITION_ESTIMATE_DATA::default(),
33579            )),
33580            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
33581                VIDEO_STREAM_INFORMATION_DATA::default(),
33582            )),
33583            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
33584                VIDEO_STREAM_STATUS_DATA::default(),
33585            )),
33586            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
33587                VISION_POSITION_ESTIMATE_DATA::default(),
33588            )),
33589            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
33590                VISION_SPEED_ESTIMATE_DATA::default(),
33591            )),
33592            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
33593            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
33594            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
33595            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
33596            _ => None,
33597        }
33598    }
33599    #[cfg(feature = "arbitrary")]
33600    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
33601        match id {
33602            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33603                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33604            )),
33605            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33606                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
33607            )),
33608            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
33609            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
33610            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
33611            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
33612            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33613                ATTITUDE_QUATERNION_DATA::random(rng),
33614            )),
33615            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33616                ATTITUDE_QUATERNION_COV_DATA::random(rng),
33617            )),
33618            ATTITUDE_TARGET_DATA::ID => {
33619                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
33620            }
33621            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
33622            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
33623            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33624                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33625                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
33626                ))
33627            }
33628            AUTOPILOT_VERSION_DATA::ID => {
33629                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
33630            }
33631            AVAILABLE_MODES_DATA::ID => {
33632                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
33633            }
33634            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33635                AVAILABLE_MODES_MONITOR_DATA::random(rng),
33636            )),
33637            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
33638            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
33639            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
33640            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33641                CAMERA_CAPTURE_STATUS_DATA::random(rng),
33642            )),
33643            CAMERA_FOV_STATUS_DATA::ID => {
33644                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
33645            }
33646            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33647                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
33648            )),
33649            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
33650                CAMERA_INFORMATION_DATA::random(rng),
33651            )),
33652            CAMERA_SETTINGS_DATA::ID => {
33653                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
33654            }
33655            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33656                CAMERA_THERMAL_RANGE_DATA::random(rng),
33657            )),
33658            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33659                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
33660            )),
33661            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33662                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
33663            )),
33664            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
33665            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
33666            CAN_FILTER_MODIFY_DATA::ID => {
33667                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
33668            }
33669            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
33670            CELLULAR_CONFIG_DATA::ID => {
33671                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
33672            }
33673            CELLULAR_STATUS_DATA::ID => {
33674                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
33675            }
33676            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33677                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
33678            )),
33679            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33680                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
33681            )),
33682            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
33683            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
33684            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
33685            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
33686            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
33687            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33688                COMPONENT_INFORMATION_DATA::random(rng),
33689            )),
33690            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33691                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
33692            )),
33693            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
33694                COMPONENT_METADATA_DATA::random(rng),
33695            )),
33696            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33697                CONTROL_SYSTEM_STATE_DATA::random(rng),
33698            )),
33699            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => Some(Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(
33700                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::random(rng),
33701            )),
33702            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
33703                Some(Self::CUBEPILOT_FIRMWARE_UPDATE_START(
33704                    CUBEPILOT_FIRMWARE_UPDATE_START_DATA::random(rng),
33705                ))
33706            }
33707            CUBEPILOT_RAW_RC_DATA::ID => {
33708                Some(Self::CUBEPILOT_RAW_RC(CUBEPILOT_RAW_RC_DATA::random(rng)))
33709            }
33710            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33711                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
33712            )),
33713            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
33714            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
33715            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33716                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
33717            )),
33718            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
33719            DEBUG_FLOAT_ARRAY_DATA::ID => {
33720                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
33721            }
33722            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
33723            DISTANCE_SENSOR_DATA::ID => {
33724                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
33725            }
33726            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
33727            ENCAPSULATED_DATA_DATA::ID => {
33728                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
33729            }
33730            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
33731            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
33732            ESTIMATOR_STATUS_DATA::ID => {
33733                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
33734            }
33735            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
33736            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
33737                EXTENDED_SYS_STATE_DATA::random(rng),
33738            )),
33739            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
33740            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33741                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
33742            )),
33743            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
33744                FLIGHT_INFORMATION_DATA::random(rng),
33745            )),
33746            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
33747            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
33748            GENERATOR_STATUS_DATA::ID => {
33749                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
33750            }
33751            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33752                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
33753            )),
33754            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33755                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
33756            )),
33757            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33758                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
33759            )),
33760            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33761                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
33762            )),
33763            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33764                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
33765            )),
33766            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33767                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33768                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
33769                ))
33770            }
33771            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33772                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
33773            )),
33774            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33775                GIMBAL_MANAGER_STATUS_DATA::random(rng),
33776            )),
33777            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33778                GLOBAL_POSITION_INT_DATA::random(rng),
33779            )),
33780            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33781                GLOBAL_POSITION_INT_COV_DATA::random(rng),
33782            )),
33783            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33784                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33785                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
33786                ))
33787            }
33788            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
33789            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
33790            GPS_GLOBAL_ORIGIN_DATA::ID => {
33791                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
33792            }
33793            GPS_INJECT_DATA_DATA::ID => {
33794                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
33795            }
33796            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
33797            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
33798            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
33799            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
33800            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
33801            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
33802            HERELINK_TELEM_DATA::ID => Some(Self::HERELINK_TELEM(HERELINK_TELEM_DATA::random(rng))),
33803            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
33804                Some(Self::HERELINK_VIDEO_STREAM_INFORMATION(
33805                    HERELINK_VIDEO_STREAM_INFORMATION_DATA::random(rng),
33806                ))
33807            }
33808            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
33809            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
33810            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
33811            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33812                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
33813            )),
33814            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
33815            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
33816            HIL_OPTICAL_FLOW_DATA::ID => {
33817                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
33818            }
33819            HIL_RC_INPUTS_RAW_DATA::ID => {
33820                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
33821            }
33822            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
33823            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
33824            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33825                HIL_STATE_QUATERNION_DATA::random(rng),
33826            )),
33827            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
33828            HYGROMETER_SENSOR_DATA::ID => {
33829                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
33830            }
33831            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
33832                ILLUMINATOR_STATUS_DATA::random(rng),
33833            )),
33834            ISBD_LINK_STATUS_DATA::ID => {
33835                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
33836            }
33837            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
33838            LINK_NODE_STATUS_DATA::ID => {
33839                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
33840            }
33841            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
33842                LOCAL_POSITION_NED_DATA::random(rng),
33843            )),
33844            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33845                LOCAL_POSITION_NED_COV_DATA::random(rng),
33846            )),
33847            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33848                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33849                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
33850                ))
33851            }
33852            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
33853            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
33854            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
33855                LOGGING_DATA_ACKED_DATA::random(rng),
33856            )),
33857            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
33858            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
33859            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
33860            LOG_REQUEST_DATA_DATA::ID => {
33861                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
33862            }
33863            LOG_REQUEST_END_DATA::ID => {
33864                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
33865            }
33866            LOG_REQUEST_LIST_DATA::ID => {
33867                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
33868            }
33869            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
33870            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
33871            MANUAL_SETPOINT_DATA::ID => {
33872                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
33873            }
33874            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
33875            MESSAGE_INTERVAL_DATA::ID => {
33876                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
33877            }
33878            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
33879            MISSION_CLEAR_ALL_DATA::ID => {
33880                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
33881            }
33882            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
33883            MISSION_CURRENT_DATA::ID => {
33884                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
33885            }
33886            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
33887            MISSION_ITEM_INT_DATA::ID => {
33888                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
33889            }
33890            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33891                MISSION_ITEM_REACHED_DATA::random(rng),
33892            )),
33893            MISSION_REQUEST_DATA::ID => {
33894                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
33895            }
33896            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33897                MISSION_REQUEST_INT_DATA::random(rng),
33898            )),
33899            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33900                MISSION_REQUEST_LIST_DATA::random(rng),
33901            )),
33902            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33903                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
33904            )),
33905            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33906                MISSION_SET_CURRENT_DATA::random(rng),
33907            )),
33908            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33909                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
33910            )),
33911            MOUNT_ORIENTATION_DATA::ID => {
33912                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
33913            }
33914            NAMED_VALUE_FLOAT_DATA::ID => {
33915                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
33916            }
33917            NAMED_VALUE_INT_DATA::ID => {
33918                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
33919            }
33920            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33921                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
33922            )),
33923            OBSTACLE_DISTANCE_DATA::ID => {
33924                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
33925            }
33926            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
33927            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33928                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
33929            )),
33930            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33931                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
33932            )),
33933            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33934                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
33935            )),
33936            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33937                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
33938            )),
33939            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33940                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
33941            )),
33942            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33943                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
33944            )),
33945            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33946                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
33947            )),
33948            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33949                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
33950            )),
33951            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33952                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
33953            )),
33954            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33955                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
33956            )),
33957            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
33958            OPTICAL_FLOW_RAD_DATA::ID => {
33959                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
33960            }
33961            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33962                ORBIT_EXECUTION_STATUS_DATA::random(rng),
33963            )),
33964            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
33965            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33966                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
33967            )),
33968            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33969                PARAM_EXT_REQUEST_READ_DATA::random(rng),
33970            )),
33971            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
33972            PARAM_EXT_VALUE_DATA::ID => {
33973                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
33974            }
33975            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
33976            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
33977                PARAM_REQUEST_LIST_DATA::random(rng),
33978            )),
33979            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
33980                PARAM_REQUEST_READ_DATA::random(rng),
33981            )),
33982            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
33983            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
33984            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
33985            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
33986            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
33987            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33988                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
33989            )),
33990            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33991                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
33992            )),
33993            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
33994            PROTOCOL_VERSION_DATA::ID => {
33995                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
33996            }
33997            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
33998            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
33999            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
34000            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
34001            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
34002            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
34003                RC_CHANNELS_OVERRIDE_DATA::random(rng),
34004            )),
34005            RC_CHANNELS_RAW_DATA::ID => {
34006                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
34007            }
34008            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
34009                RC_CHANNELS_SCALED_DATA::random(rng),
34010            )),
34011            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
34012                REQUEST_DATA_STREAM_DATA::random(rng),
34013            )),
34014            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
34015            RESOURCE_REQUEST_DATA::ID => {
34016                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
34017            }
34018            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
34019                RESPONSE_EVENT_ERROR_DATA::random(rng),
34020            )),
34021            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
34022                SAFETY_ALLOWED_AREA_DATA::random(rng),
34023            )),
34024            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
34025                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
34026            )),
34027            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
34028            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
34029            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
34030            SCALED_PRESSURE_DATA::ID => {
34031                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
34032            }
34033            SCALED_PRESSURE2_DATA::ID => {
34034                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
34035            }
34036            SCALED_PRESSURE3_DATA::ID => {
34037                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
34038            }
34039            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
34040            SERVO_OUTPUT_RAW_DATA::ID => {
34041                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
34042            }
34043            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
34044            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
34045                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
34046            )),
34047            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
34048                SET_ATTITUDE_TARGET_DATA::random(rng),
34049            )),
34050            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
34051                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
34052            )),
34053            SET_HOME_POSITION_DATA::ID => {
34054                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
34055            }
34056            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
34057            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
34058                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
34059            )),
34060            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34061                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
34062            )),
34063            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
34064            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
34065                SMART_BATTERY_INFO_DATA::random(rng),
34066            )),
34067            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
34068            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34069                STORAGE_INFORMATION_DATA::random(rng),
34070            )),
34071            SUPPORTED_TUNES_DATA::ID => {
34072                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
34073            }
34074            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
34075            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
34076            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
34077            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
34078            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
34079            TERRAIN_REQUEST_DATA::ID => {
34080                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
34081            }
34082            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
34083            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34084                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
34085            )),
34086            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34087                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
34088                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
34089                ))
34090            }
34091            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34092                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
34093                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
34094                ))
34095            }
34096            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
34097            UAVCAN_NODE_INFO_DATA::ID => {
34098                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
34099            }
34100            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
34101                UAVCAN_NODE_STATUS_DATA::random(rng),
34102            )),
34103            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
34104                UTM_GLOBAL_POSITION_DATA::random(rng),
34105            )),
34106            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
34107            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
34108            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
34109            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34110                VICON_POSITION_ESTIMATE_DATA::random(rng),
34111            )),
34112            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34113                VIDEO_STREAM_INFORMATION_DATA::random(rng),
34114            )),
34115            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34116                VIDEO_STREAM_STATUS_DATA::random(rng),
34117            )),
34118            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34119                VISION_POSITION_ESTIMATE_DATA::random(rng),
34120            )),
34121            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34122                VISION_SPEED_ESTIMATE_DATA::random(rng),
34123            )),
34124            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
34125            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
34126            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
34127            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
34128            _ => None,
34129        }
34130    }
34131    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34132        match self {
34133            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34134            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
34135            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
34136            Self::AIS_VESSEL(body) => body.ser(version, bytes),
34137            Self::ALTITUDE(body) => body.ser(version, bytes),
34138            Self::ATTITUDE(body) => body.ser(version, bytes),
34139            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
34140            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
34141            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
34142            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
34143            Self::AUTH_KEY(body) => body.ser(version, bytes),
34144            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
34145            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
34146            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
34147            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
34148            Self::BATTERY_INFO(body) => body.ser(version, bytes),
34149            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
34150            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
34151            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
34152            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
34153            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
34154            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
34155            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
34156            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
34157            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
34158            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
34159            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
34160            Self::CANFD_FRAME(body) => body.ser(version, bytes),
34161            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
34162            Self::CAN_FRAME(body) => body.ser(version, bytes),
34163            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
34164            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
34165            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
34166            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
34167            Self::COLLISION(body) => body.ser(version, bytes),
34168            Self::COMMAND_ACK(body) => body.ser(version, bytes),
34169            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
34170            Self::COMMAND_INT(body) => body.ser(version, bytes),
34171            Self::COMMAND_LONG(body) => body.ser(version, bytes),
34172            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
34173            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
34174            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
34175            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
34176            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(body) => body.ser(version, bytes),
34177            Self::CUBEPILOT_FIRMWARE_UPDATE_START(body) => body.ser(version, bytes),
34178            Self::CUBEPILOT_RAW_RC(body) => body.ser(version, bytes),
34179            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
34180            Self::CURRENT_MODE(body) => body.ser(version, bytes),
34181            Self::DATA_STREAM(body) => body.ser(version, bytes),
34182            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
34183            Self::DEBUG(body) => body.ser(version, bytes),
34184            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
34185            Self::DEBUG_VECT(body) => body.ser(version, bytes),
34186            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
34187            Self::EFI_STATUS(body) => body.ser(version, bytes),
34188            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
34189            Self::ESC_INFO(body) => body.ser(version, bytes),
34190            Self::ESC_STATUS(body) => body.ser(version, bytes),
34191            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
34192            Self::EVENT(body) => body.ser(version, bytes),
34193            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
34194            Self::FENCE_STATUS(body) => body.ser(version, bytes),
34195            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
34196            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
34197            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
34198            Self::FUEL_STATUS(body) => body.ser(version, bytes),
34199            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
34200            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
34201            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
34202            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
34203            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
34204            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
34205            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
34206            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
34207            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
34208            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
34209            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
34210            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34211            Self::GPS2_RAW(body) => body.ser(version, bytes),
34212            Self::GPS2_RTK(body) => body.ser(version, bytes),
34213            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34214            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
34215            Self::GPS_INPUT(body) => body.ser(version, bytes),
34216            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
34217            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
34218            Self::GPS_RTK(body) => body.ser(version, bytes),
34219            Self::GPS_STATUS(body) => body.ser(version, bytes),
34220            Self::HEARTBEAT(body) => body.ser(version, bytes),
34221            Self::HERELINK_TELEM(body) => body.ser(version, bytes),
34222            Self::HERELINK_VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
34223            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
34224            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
34225            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
34226            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
34227            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
34228            Self::HIL_GPS(body) => body.ser(version, bytes),
34229            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
34230            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
34231            Self::HIL_SENSOR(body) => body.ser(version, bytes),
34232            Self::HIL_STATE(body) => body.ser(version, bytes),
34233            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
34234            Self::HOME_POSITION(body) => body.ser(version, bytes),
34235            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
34236            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
34237            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
34238            Self::LANDING_TARGET(body) => body.ser(version, bytes),
34239            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
34240            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
34241            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
34242            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
34243            Self::LOGGING_ACK(body) => body.ser(version, bytes),
34244            Self::LOGGING_DATA(body) => body.ser(version, bytes),
34245            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
34246            Self::LOG_DATA(body) => body.ser(version, bytes),
34247            Self::LOG_ENTRY(body) => body.ser(version, bytes),
34248            Self::LOG_ERASE(body) => body.ser(version, bytes),
34249            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
34250            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
34251            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
34252            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
34253            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
34254            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
34255            Self::MEMORY_VECT(body) => body.ser(version, bytes),
34256            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
34257            Self::MISSION_ACK(body) => body.ser(version, bytes),
34258            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
34259            Self::MISSION_COUNT(body) => body.ser(version, bytes),
34260            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
34261            Self::MISSION_ITEM(body) => body.ser(version, bytes),
34262            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
34263            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
34264            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
34265            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
34266            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
34267            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
34268            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
34269            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
34270            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
34271            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
34272            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
34273            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
34274            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
34275            Self::ODOMETRY(body) => body.ser(version, bytes),
34276            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
34277            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
34278            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
34279            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
34280            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
34281            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
34282            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
34283            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
34284            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
34285            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
34286            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
34287            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
34288            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
34289            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
34290            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
34291            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
34292            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
34293            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
34294            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
34295            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
34296            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
34297            Self::PARAM_SET(body) => body.ser(version, bytes),
34298            Self::PARAM_VALUE(body) => body.ser(version, bytes),
34299            Self::PING(body) => body.ser(version, bytes),
34300            Self::PLAY_TUNE(body) => body.ser(version, bytes),
34301            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
34302            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34303            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34304            Self::POWER_STATUS(body) => body.ser(version, bytes),
34305            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
34306            Self::RADIO_STATUS(body) => body.ser(version, bytes),
34307            Self::RAW_IMU(body) => body.ser(version, bytes),
34308            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
34309            Self::RAW_RPM(body) => body.ser(version, bytes),
34310            Self::RC_CHANNELS(body) => body.ser(version, bytes),
34311            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
34312            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
34313            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
34314            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
34315            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
34316            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
34317            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
34318            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
34319            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
34320            Self::SCALED_IMU(body) => body.ser(version, bytes),
34321            Self::SCALED_IMU2(body) => body.ser(version, bytes),
34322            Self::SCALED_IMU3(body) => body.ser(version, bytes),
34323            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
34324            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
34325            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
34326            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
34327            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
34328            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
34329            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34330            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
34331            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34332            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
34333            Self::SET_MODE(body) => body.ser(version, bytes),
34334            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34335            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34336            Self::SIM_STATE(body) => body.ser(version, bytes),
34337            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
34338            Self::STATUSTEXT(body) => body.ser(version, bytes),
34339            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
34340            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
34341            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
34342            Self::SYS_STATUS(body) => body.ser(version, bytes),
34343            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
34344            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
34345            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
34346            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
34347            Self::TIMESYNC(body) => body.ser(version, bytes),
34348            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
34349            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
34350            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
34351            Self::TUNNEL(body) => body.ser(version, bytes),
34352            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
34353            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
34354            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
34355            Self::V2_EXTENSION(body) => body.ser(version, bytes),
34356            Self::VFR_HUD(body) => body.ser(version, bytes),
34357            Self::VIBRATION(body) => body.ser(version, bytes),
34358            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34359            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
34360            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
34361            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34362            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
34363            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
34364            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
34365            Self::WINCH_STATUS(body) => body.ser(version, bytes),
34366            Self::WIND_COV(body) => body.ser(version, bytes),
34367        }
34368    }
34369    fn extra_crc(id: u32) -> u8 {
34370        match id {
34371            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34372            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
34373            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
34374            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
34375            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
34376            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
34377            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
34378            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
34379            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
34380            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
34381            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
34382            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34383                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
34384            }
34385            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
34386            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
34387            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
34388            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
34389            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
34390            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
34391            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
34392            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
34393            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
34394            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
34395            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
34396            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
34397            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
34398            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
34399            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
34400            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
34401            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
34402            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
34403            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
34404            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
34405            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
34406            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
34407            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
34408            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
34409            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
34410            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
34411            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
34412            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
34413            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
34414            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
34415            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
34416            CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::ID => {
34417                CUBEPILOT_FIRMWARE_UPDATE_RESP_DATA::EXTRA_CRC
34418            }
34419            CUBEPILOT_FIRMWARE_UPDATE_START_DATA::ID => {
34420                CUBEPILOT_FIRMWARE_UPDATE_START_DATA::EXTRA_CRC
34421            }
34422            CUBEPILOT_RAW_RC_DATA::ID => CUBEPILOT_RAW_RC_DATA::EXTRA_CRC,
34423            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
34424            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
34425            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
34426            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
34427            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
34428            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
34429            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
34430            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
34431            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
34432            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
34433            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
34434            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
34435            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
34436            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
34437            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
34438            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
34439            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
34440            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
34441            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
34442            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
34443            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
34444            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
34445            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
34446            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
34447            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
34448            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
34449            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34450                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
34451            }
34452            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
34453            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
34454            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
34455            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
34456            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34457                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
34458            }
34459            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
34460            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
34461            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34462            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
34463            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
34464            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
34465            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
34466            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
34467            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
34468            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
34469            HERELINK_TELEM_DATA::ID => HERELINK_TELEM_DATA::EXTRA_CRC,
34470            HERELINK_VIDEO_STREAM_INFORMATION_DATA::ID => {
34471                HERELINK_VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC
34472            }
34473            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
34474            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
34475            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
34476            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
34477            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
34478            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
34479            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
34480            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
34481            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
34482            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
34483            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
34484            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
34485            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
34486            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
34487            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
34488            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
34489            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
34490            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
34491            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
34492            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34493                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
34494            }
34495            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
34496            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
34497            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
34498            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
34499            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
34500            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
34501            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
34502            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
34503            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
34504            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
34505            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
34506            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
34507            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
34508            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
34509            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
34510            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
34511            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
34512            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
34513            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
34514            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
34515            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
34516            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
34517            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
34518            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
34519            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
34520            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
34521            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
34522            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
34523            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
34524            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
34525            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
34526            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
34527            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
34528            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
34529            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
34530            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
34531            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
34532            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
34533            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
34534            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
34535            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
34536            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
34537            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
34538            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
34539            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
34540            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
34541            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
34542            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
34543            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
34544            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
34545            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
34546            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
34547            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
34548            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
34549            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
34550            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
34551            PING_DATA::ID => PING_DATA::EXTRA_CRC,
34552            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
34553            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
34554            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
34555            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34556            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
34557            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
34558            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
34559            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
34560            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
34561            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
34562            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
34563            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
34564            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
34565            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
34566            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
34567            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
34568            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
34569            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
34570            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
34571            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
34572            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
34573            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
34574            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
34575            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
34576            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
34577            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
34578            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
34579            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
34580            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
34581            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34582            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
34583            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34584            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
34585            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
34586            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34587                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
34588            }
34589            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34590            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
34591            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
34592            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
34593            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
34594            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
34595            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
34596            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
34597            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
34598            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
34599            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
34600            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
34601            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
34602            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
34603            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34604                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
34605            }
34606            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34607                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
34608            }
34609            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
34610            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
34611            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
34612            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
34613            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
34614            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
34615            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
34616            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34617            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
34618            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
34619            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34620            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
34621            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
34622            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
34623            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
34624            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
34625            _ => 0,
34626        }
34627    }
34628    fn target_system_id(&self) -> Option<u8> {
34629        match self {
34630            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
34631            Self::CANFD_FRAME(inner) => Some(inner.target_system),
34632            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
34633            Self::CAN_FRAME(inner) => Some(inner.target_system),
34634            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
34635            Self::COMMAND_ACK(inner) => Some(inner.target_system),
34636            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
34637            Self::COMMAND_INT(inner) => Some(inner.target_system),
34638            Self::COMMAND_LONG(inner) => Some(inner.target_system),
34639            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_system),
34640            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_system),
34641            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
34642            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
34643            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
34644            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
34645            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
34646            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
34647            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
34648            Self::LOGGING_ACK(inner) => Some(inner.target_system),
34649            Self::LOGGING_DATA(inner) => Some(inner.target_system),
34650            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
34651            Self::LOG_ERASE(inner) => Some(inner.target_system),
34652            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
34653            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
34654            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
34655            Self::MISSION_ACK(inner) => Some(inner.target_system),
34656            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
34657            Self::MISSION_COUNT(inner) => Some(inner.target_system),
34658            Self::MISSION_ITEM(inner) => Some(inner.target_system),
34659            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
34660            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
34661            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
34662            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
34663            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
34664            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
34665            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
34666            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
34667            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
34668            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
34669            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
34670            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
34671            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
34672            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
34673            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
34674            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
34675            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
34676            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
34677            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
34678            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
34679            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
34680            Self::PARAM_SET(inner) => Some(inner.target_system),
34681            Self::PING(inner) => Some(inner.target_system),
34682            Self::PLAY_TUNE(inner) => Some(inner.target_system),
34683            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
34684            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
34685            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
34686            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
34687            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
34688            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
34689            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
34690            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
34691            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
34692            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
34693            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
34694            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
34695            Self::SET_MODE(inner) => Some(inner.target_system),
34696            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
34697            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
34698            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
34699            Self::TIMESYNC(inner) => Some(inner.target_system),
34700            Self::TUNNEL(inner) => Some(inner.target_system),
34701            Self::V2_EXTENSION(inner) => Some(inner.target_system),
34702            _ => None,
34703        }
34704    }
34705    fn target_component_id(&self) -> Option<u8> {
34706        match self {
34707            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
34708            Self::CANFD_FRAME(inner) => Some(inner.target_component),
34709            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
34710            Self::CAN_FRAME(inner) => Some(inner.target_component),
34711            Self::COMMAND_ACK(inner) => Some(inner.target_component),
34712            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
34713            Self::COMMAND_INT(inner) => Some(inner.target_component),
34714            Self::COMMAND_LONG(inner) => Some(inner.target_component),
34715            Self::CUBEPILOT_FIRMWARE_UPDATE_RESP(inner) => Some(inner.target_component),
34716            Self::CUBEPILOT_FIRMWARE_UPDATE_START(inner) => Some(inner.target_component),
34717            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
34718            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
34719            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
34720            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
34721            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
34722            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
34723            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
34724            Self::LOGGING_ACK(inner) => Some(inner.target_component),
34725            Self::LOGGING_DATA(inner) => Some(inner.target_component),
34726            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
34727            Self::LOG_ERASE(inner) => Some(inner.target_component),
34728            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
34729            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
34730            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
34731            Self::MISSION_ACK(inner) => Some(inner.target_component),
34732            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
34733            Self::MISSION_COUNT(inner) => Some(inner.target_component),
34734            Self::MISSION_ITEM(inner) => Some(inner.target_component),
34735            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
34736            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
34737            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
34738            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
34739            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
34740            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
34741            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
34742            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
34743            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
34744            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
34745            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
34746            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
34747            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
34748            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
34749            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
34750            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
34751            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
34752            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
34753            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
34754            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
34755            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
34756            Self::PARAM_SET(inner) => Some(inner.target_component),
34757            Self::PING(inner) => Some(inner.target_component),
34758            Self::PLAY_TUNE(inner) => Some(inner.target_component),
34759            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
34760            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
34761            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
34762            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
34763            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
34764            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
34765            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
34766            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
34767            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
34768            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
34769            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
34770            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
34771            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
34772            Self::TIMESYNC(inner) => Some(inner.target_component),
34773            Self::TUNNEL(inner) => Some(inner.target_component),
34774            Self::V2_EXTENSION(inner) => Some(inner.target_component),
34775            _ => None,
34776        }
34777    }
34778}